Added widget for success/error messages

This commit is contained in:
Deon George 2020-05-06 17:13:15 +10:00
parent 87819891a1
commit 9389fd9e83
No known key found for this signature in database
GPG Key ID: 7670E8DC27415254

View File

@ -0,0 +1,23 @@
<!-- Success -->
@if(session()->has('success'))
<div class="alert alert-success alert-dismissible">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
<h5><i class="icon fas fa-check"></i> Success!</h5>
<ul>
<li>{{ session()->get('success') }}</li>
</ul>
</div>
@endif
<!-- Errors -->
@if ($errors->any())
<div class="alert alert-danger alert-dismissible">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
<h5><i class="icon fas fa-ban"></i> Whoops!</h5>
<ul>
@foreach ($errors->all() as $error)
<li>{!! $error !!}</li>
@endforeach
</ul>
</div>
@endif