Level 75
Change it to lowercase.
auth()->user()->update($request->all());
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
vs code keeps underlining UPDATE in this code, but it works, i don't know if its a library i'm not importing
public function profile_update(ProfileRequest $request)
{
auth()->user()->UPDATE($request->all());
Alert::success('Updated', 'Profile is Successfully Updated');
return back();
}
If you are using an intellisense plugin, then it probably does not know that auth()->user() (an instance of Authenticable) extends Eloquent; if it really annoys you, then you could do this:
/** @var User $user */
$user = auth()->user();
$user->update(request()->all());
Please or to participate in this conversation.