I'm trying to make changes to the user record. I expect a User Eloquent model when I call Auth::user() but I receive some kind of builder object.
If I dd()
I get the model output, but I can't perform actions like
$user = Auth::user();
$user->fill(['username' => $newValue]);
I can't find any info online. Can anyone explain?
Thanks,
Mei
have you tried just $user->update(['username' => $newValue])? You should get the authenticated user from Auth::user().
It seems that I was mistaken. It is possible to do the above my error was a few lines down.
Sorry!
Mei
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community