vendredi 27 avril 2018

Laravel 5 Flash messages not working

My flash messages are not displaying on the view. I have tried post SO questions but didn't worked. Here is my controller code:

use Session;
//other code
//my code to set flash message and redirect it

    \Session::flash('message', $message);  
    return redirect('admin/groups/add');

My View code:

@if(Session::has('message'))
 <div class="alert alert-danger" id="alert_danger">
   {!!Session::get('message')!!}
 </div>
@endif

I don't know where I am going wrong.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire