Skip to content

Instantly share code, notes, and snippets.

@carbontwelve
Created December 10, 2013 10:54
Show Gist options
  • Save carbontwelve/7888860 to your computer and use it in GitHub Desktop.
Save carbontwelve/7888860 to your computer and use it in GitHub Desktop.
Found this somewhere on the internet and need to keep it safe for future projects. Very nice for using bootstrap notification boxes in Laravel4 views
@if ($errors->any())
<div class="alert alert-error alert-block">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<h4>Error</h4>
Please check the form below for errors
</div>
@endif
@if ($message = Session::get('success'))
<div class="alert alert-success alert-block">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<h4>Success</h4>
{{ $message }}
</div>
@endif
@if ($message = Session::get('error'))
<div class="alert alert-error alert-block">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<h4>Error</h4>
{{ $message }}
</div>
@endif
@if ($message = Session::get('warning'))
<div class="alert alert-warning alert-block">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<h4>Warning</h4>
{{ $message }}
</div>
@endif
@if ($message = Session::get('info'))
<div class="alert alert-info alert-block">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<h4>Info</h4>
{{ $message }}
</div>
@endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment