Hey guys,
Kernel.php : https://ibb.co/mHxOeQ
UserController
$this->validate($request, [
'email' => 'required|email',
'password' => 'required|min:3'
]);
return redirect('/')->with('status', 'Book was added');
View File
@if(Session::has('status'))
<div class="alert alert-info">
<a class="close" data-dismiss="alert">×</a>
<strong>Heads Up!</strong> {!!Session::get('status')!!}
</div>
@endif
Flash and Validator don't work. How can I solve ?
Good Morning, usually Flash works only once, so if after the redirection there is another redirection, the flash is cleared. From you code nothing seems to be wrong, but i personnaly use the Helper instead of that facade (check if the right facade is used).
Maybe using a helper will help you https://laravel.com/docs/5.5/session#using-the-session
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community