Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

kachi_dk's avatar

red line in vs_code

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();
    }
0 likes
4 replies
MichalOravec's avatar

Change it to lowercase.

auth()->user()->update($request->all());
kachi_dk's avatar

i have tried it, it stilll shows the red line

tykus's avatar
tykus
Best Answer
Level 104

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.