How to set flash message in laravel?
Set flash message in laravel
You need to add this code in your controller
Session::flash('loginerror', "Your Email-id or Password does not match.");
return Redirect::to('login');
Now you need to add this code in your view section
@if (Session::has('loginerror'))
<h2>{{ Session::get('loginerror') }}</h2>
@endif
You need to add this code in your controller
Session::flash('loginerror', "Your Email-id or Password does not match.");
return Redirect::to('login');
Now you need to add this code in your view section
@if (Session::has('loginerror'))
<h2>{{ Session::get('loginerror') }}</h2>
@endif
Comments
Post a Comment