I have in the same page Login and Register Form. To show the correct errors validations (or in the login form or in the register form) I found tihs solution: Laravel login and register forms on the same page in Laravel 5.2
Bassically the solution is register in the session variable what form is clicked..
For the fist time it's working, but now I notice that every time that I refresh my browser new session is registed so when I get the value it return a wrong value. If I go to my folder: framework/sessions I see several session created, one has stored "register" value other has "adios" value but finally always return "register value"
I have In my RegisterController this:
public function __construct(Request $request)
{
$this->middleware('guest');
Session::put('last_auth_attempt', $request->auth_attempt);
Session::save();
}
In my LoginController this:
public function __construct(Request $request)
{
$this->middleware('guest')->except('logout');
Session::put('last_auth_attempt', 'adios');
Session::save();
}
I write in my register.blade.php I get the value:
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire