lundi 25 janvier 2016

Auth::check() worked but Auth::viaRemember() not working in Laravel 5.2?

I want to log user is remember or not:

if (Auth::viaRemember()) {
        return 'remember';
    }

if (Auth::check()) {
        return 1;
    }
if (Auth::attempt(['email' => $email, 'password' => $password], true)) {
        return Auth::user();
    }
    else{
        return 'wrong email or pass';
    }

Auth::attempt() return true, users table saved remember_token is k38bsshu...dKm, and when I reload browser, the page return 1; (Auth::viaRemember() always return false). Any helps. Thanks.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1nLR1CT
via IFTTT

Aucun commentaire:

Enregistrer un commentaire