lundi 5 septembre 2016

\Auth::user() is null in 5.3.6?

In Laravel 5.2 I was using \Auth::user() , which was showing user details but in Laravel 5.3.6 \Auth::user() is always null

Then I search this Article

As per above code, I defined the method in Login Controller.

use Illuminate\Support\Facades\Auth;

protected function guard()
{
    return Auth:guard('name-of-guard');
}

Still it is null



via Chebli Mohamed

1 commentaire:

Hendra-1 a dit…

try to add
Auth::routes();

in your web.php

Enregistrer un commentaire