4 months ago

Update user

Posted 4 months ago by hjortur17

Hi I can't figure out how I can update $user. I always get the password is null. Any ideas how to get it to pass with making the user update the password every time he is updating maybe the username.

Here is the update function:

public function update(User $user)
        if (! request()->input('password') === '')
            $user->password = bcrypt(request()->input('password'));


        return redirect()->back();

Please sign in or create an account to participate in this conversation.