Skip to content

Instantly share code, notes, and snippets.

@codehell
Created April 4, 2017 13:15
Show Gist options
  • Save codehell/a7433e0653fc87ee0c419571aa94fad8 to your computer and use it in GitHub Desktop.
Save codehell/a7433e0653fc87ee0c419571aa94fad8 to your computer and use it in GitHub Desktop.
layout for laravel system alerts with blade and bootstrap 3
@if(Session::has('success'))
<div class="container">
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="alert alert-success alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<strong>Well done!</strong> {{ Session::get('success') }}
</div>
</div>
</div>
</div>
@endif
@if(Session::has('info'))
<div class="container">
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="alert alert-info alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<strong>Heads up!</strong> {{ Session::get('info') }}
</div>
</div>
</div>
</div>
@endif
@if(Session::has('warning'))
<div class="container">
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="alert alert-warning alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<strong>Warning!</strong> {{ Session::get('warning') }}
</div>
</div>
</div>
</div>
@endif
@if(Session::has('danger'))
<div class="container">
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="alert alert-danger alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<strong>Oh snap!</strong> {{ Session::get('danger') }}
</div>
</div>
</div>
</div>
@endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment