I\'m making my first app in Laravel and am trying to get my head around the session flash messages. As far as I\'m aware in my controller action I can set a flash message ei
Simply return with the 'flag' that you want to be treated without using any additional user function. The Controller:
return \Redirect::back()->withSuccess( 'Message you want show in View' );
Notice that I used the 'Success' flag.
The View:
@if( Session::has( 'success' ))
{{ Session::get( 'success' ) }}
@elseif( Session::has( 'warning' ))
{{ Session::get( 'warning' ) }}
@endif
Yes, it really works!