I'm trying to get my flash message to display.
This is in my routing file
Route::post('users/groups/save', function(){
return Redirect::to('users/groups')->withInput()->with('success', 'Group Created Successfully.');
});
This is in my view
{{ $success = Session::get('success') }}
@if($success)
<div class="alert-box success">
<h2>{{ $success }}</h2>
</div>
@endif
But nothing is working.
When I try this, I get an error Variable $success is undefined. But it actually shows the flash message too.
{{ Session::get('success') }}
@if($success)
<div class="alert-box success">
<h2>{{ $success }}</h2>
</div>
@endif