Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Laravel Messages Blade - displaying Bootstrap Messages based on Flash Data
@if(isset($success) || Session::has('success') )
<div class="alert alert-success alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
<strong>Success!</strong> {{ isset($success) ? $info : Session::get('success') }}
</div>
@endif
@if(isset($error) || Session::has('error') )
<div class="alert alert-danger alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
<strong>Success!</strong> {{ isset($error) ? $info : Session::get('error') }}
</div>
@endif
@if(isset($warning) || Session::has('warning') )
<div class="alert alert-warning alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
<strong>Success!</strong> {{ isset($warning) ? $info : Session::get('warning') }}
</div>
@endif
@if(isset($info) || Session::has('info') )
<div class="alert alert-info alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
<strong>Success!</strong> {{ isset($info) ? $info : Session::get('info') }}
</div>
@endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.