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
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:
try to add
Auth::routes();
in your web.php
Enregistrer un commentaire