Last active
November 24, 2022 04:23
-
-
Save james2doyle/c87fbfab4439206d4a63f6202acaa2fb to your computer and use it in GitHub Desktop.
Notification template for Sessions in Laravel. Assumes bootstrap and animate.css.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="container"> | |
<div class="row"> | |
@if ($message = session()->get('success')) | |
<div class="animated fadeIn alert alert-success alert-dismissable"> | |
<button type="button" class="close" aria-label="Close" data-dismiss="alert" aria-hidden="true">×</button> | |
<strong>Success:</strong> {!! $message !!} | |
</div> | |
{{ session()->forget('success') }} | |
@endif | |
@if ($message = session()->get('error')) | |
<div class="animated fadeIn alert alert-danger alert-dismissable"> | |
<button type="button" class="close" aria-label="Close" data-dismiss="alert" aria-hidden="true">×</button> | |
<strong>Error:</strong> {!! $message !!} | |
</div> | |
{{ session()->forget('error') }} | |
@endif | |
@if (count($errors) > 0) | |
<div class="animated fadeIn alert alert-danger alert-dismissable"> | |
<button type="button" class="close" aria-label="Close" data-dismiss="alert" aria-hidden="true">×</button> | |
<strong>Whoops! Something went wrong!</strong> | |
<ul> | |
@foreach ($errors->all() as $error) | |
<li>{{ $error }}</li> | |
@endforeach | |
</ul> | |
</div> | |
@endif | |
@if ($message = session()->get('warning')) | |
<div class="animated fadeIn alert alert-warning alert-dismissable"> | |
<button type="button" class="close" aria-label="Close" data-dismiss="alert" aria-hidden="true">×</button> | |
<strong>Warning:</strong> {!! $message !!} | |
</div> | |
{{ session()->forget('warning') }} | |
@endif | |
@if ($message = session()->get('info')) | |
<div class="animated fadeIn alert alert-info alert-dismissable"> | |
<button type="button" class="close" aria-label="Close" data-dismiss="alert" aria-hidden="true">×</button> | |
<strong>Info:</strong> {!! $message !!} | |
</div> | |
{{ session()->forget('info') }} | |
@endif | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment