Skip to content

Instantly share code, notes, and snippets.

@manuelgeek
Created June 10, 2018 06:41
Show Gist options
  • Save manuelgeek/1f8281fc08c2a5ceedb1a9c4ea9613b5 to your computer and use it in GitHub Desktop.
Save manuelgeek/1f8281fc08c2a5ceedb1a9c4ea9613b5 to your computer and use it in GitHub Desktop.
@if (Session::has('success'))
<div class="alert alert-success" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
{{ Session::get('success')}}
</div>
@endif
@if (Session::has('error'))
<div class="alert alert-danger" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
{{ Session::get('error')}}
</div>
@endif
@if (isset($errors) )
@if (count($errors) > 0)
<div class="alert alert-danger" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
<strong>Errors:</strong>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</div>
@endif
@endif
@manuelgeek
Copy link
Author

Make it a partial, then include on top of your

tag

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment