Created
March 31, 2016 08:10
-
-
Save rodrigoSyscop/a89d7a52944db9bad3bb4f9722571a54 to your computer and use it in GitHub Desktop.
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
@if (Session::has('info')) | |
<div class="alert alert-info alert-dismissible" role="alert"> | |
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button> | |
<strong>Info!</strong> {{ Session::get('info') }} | |
</div> | |
@endif | |
@if (Session::has('success')) | |
<div class="alert alert-success alert-dismissible" role="alert"> | |
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button> | |
<strong>Success!</strong> {{ Session::get('success') }} | |
</div> | |
@endif | |
@if (Session::has('warning')) | |
<div class="alert alert-warning alert-dismissible" role="alert"> | |
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button> | |
<strong>Warning!</strong> {{ Session::get('warning') }} | |
</div> | |
@endif | |
@if (Session::has('danger')) | |
<div class="alert alert-danger alert-dismissible" role="alert"> | |
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button> | |
<strong>Danger!</strong> {{ Session::get('danger') }} | |
</div> | |
@endif |
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
<?php | |
namespace App\Http\Controllers; | |
use App\Http\Requests; | |
use Illuminate\Http\Request; | |
use Illuminate\Support\Facades\Session; | |
class FooController extends Controller | |
{ | |
public function index() | |
{ | |
Session::flash('danger', 'Oops, some error ocurred'); | |
Session::flash('success', 'Ok, looks grate.'); | |
return redirect('/'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment