Before I posted this, I did some searching but still I don't know it always return false. My code is below
html
<input type="checkbox" name="remember"/>
controller
$remember = ($request->has('remember')) ? true : false;
if (Auth::attempt($credentials, $remember))
Then after successful logged-in. I checked the dd(Auth::viaRemember()); and it return false. Even changed my config/session.php setting 'expire_on_close' => true from false.
Basically what I want is when the user tick the remember me checkbox I will set the session lifetime to 3 days else to 1 day only.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire