forked from miguel456/rbrecruiter
Added error messages to settings.blade.php
This commit is contained in:
parent
2afea88846
commit
41e3e817a2
|
@ -40,12 +40,15 @@ class OptionsController extends Controller
|
|||
}
|
||||
catch(\Exception $ex)
|
||||
{
|
||||
$errorCond = true;
|
||||
$request->session()->flash('error', 'An error occurred while trying to save settings: ' . $ex->getMessage());
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
$request->session()->flash('success', 'Settings saved successfully!');
|
||||
if (!isset($errorCond))
|
||||
{
|
||||
$request->session()->flash('success', 'Settings saved successfully!');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -20,6 +20,12 @@
|
|||
</script>
|
||||
@endif
|
||||
|
||||
@if (session()->has('error'))
|
||||
<script>
|
||||
toastr.error("{{session('error')}}")
|
||||
</script>
|
||||
@endif
|
||||
|
||||
@if($errors->any())
|
||||
@foreach ($errors->all() as $error)
|
||||
<script>toastr.error('{{$error}}', 'Validation error!')</script>
|
||||
|
|
Loading…
Reference in New Issue