I have a Laravel app where I want to get Auth::user in my Model. But when I do Auth::check() in model it returns false where as in controller it returns true
protected static function boot()
{
parent::boot();
if(Auth::check()){ //returns false
-- do my stuff--
}
}
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire