I am trying to implement flash messaging using sessions but am unable to do so.
In my controller I have:
public function store(Request $request) {
I use the following:
In my controller:
public function xyz(){
// code
// This
return redirect()->action('homeController@index')->with('success', 'Check! Everything done!');
// Or this
return redirect('/index')->with('success', 'Check! Everything done!');
}
In my view:
@if(session('success'))
{{ session('success') }}
@endif
Nothing else. The web-middleware is assigned to every route.