Created
June 12, 2014 17:17
-
-
Save cagartner/430fc959b8e5397a96e7 to your computer and use it in GitHub Desktop.
Exibição de erros - Laravel
This file contains hidden or 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
| @if (Session::has('error')) | |
| <div class="alert alert-danger"> | |
| <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button> | |
| <strong>Oppss!</strong> {{ Session::get('error') }} | |
| </div> | |
| {{ Session::forget('error') }} | |
| @endif | |
| @if (Session::has('success')) | |
| <div class="alert alert-success"> | |
| <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button> | |
| <strong>Sucesso!</strong> {{ Session::get('success') }} | |
| </div> | |
| {{ Session::forget('success') }} | |
| @endif | |
| @if (Session::has('info')) | |
| <div class="alert alert-info"> | |
| <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button> | |
| <strong>Informação!</strong> {{ Session::get('info') }} | |
| </div> | |
| {{ Session::forget('info') }} | |
| @endif | |
| @if (Session::has('status')) | |
| <div class="alert alert-info"> | |
| <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button> | |
| <strong>Informação!</strong> {{ Session::get('status') }} | |
| </div> | |
| {{ Session::forget('status') }} | |
| @endif | |
| @if (Session::has('warning')) | |
| <div class="alert alert-warning"> | |
| <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button> | |
| <strong>Atenção!</strong> {{ Session::get('warning') }} | |
| </div> | |
| {{ Session::forget('warning') }} | |
| @endif | |
| @if (Session::has('errors')) | |
| <div class="alert alert-danger"> | |
| <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button> | |
| <strong>Oppss!</strong> Ocorreram os erros abaixo: | |
| <ul> | |
| @foreach (Session::get('errors') as $error) | |
| <li>{{ $error }}</li> | |
| @endforeach | |
| </ul> | |
| </div> | |
| {{ Session::forget('errors') }} | |
| @endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment