I'm using Laravel 5.5 and am reading up a bit on morphToMany relationships.
My naming for this model is a bit odd, but please bare with me.
I have a Drool model, and im building a getIsDrooledAttribute function.
The function which is returning errors is the following;
$drool = $this->drools()->whereUserId(Auth::id())->first();
return (!is_null($drool)) ? true : false;
and the error im getting is
Class 'App\Auth' not found
I am running the standard auth system created when running php artisan make:auth
Any help would be greatly appreciated.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire