If I want to check whether the user is logged in within my Laravel 5.1 application I can either use
if (Auth::user()) {...}
or
if (Auth::check()) {...}
is there a reason to prefer one over the other when checking if a user is logged in?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire