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

YannickJ's avatar

Old session input still shown after update

Hi everyone!

Recently I have stopped using the Laravel Collective Form Helpers and switched to adding value="{{old('first_name',$user->first_name)}}" to my input-tags. This seemed to work as supposed, however, after updating a record the function still loads the old values. The records were succesfully updated in the database through this update function:

public function update(UserFormRequest $request, User $user)
    {
        $user->update($request->all());

        flash('<strong>Success!</strong> The user is updated succesfully.')->success();

        return view('users.show')->with(compact('user'));
    }

Redis is being used as session driver and it seems to work correct with other session actions, like the flash message I am sending after updating. What am I doing wrong?

0 likes
2 replies
Snapey's avatar

after updating you should redirect to a new page and not return a view

YannickJ's avatar

Thanks for your answer! I just found out that the session wasn't the problem, but the way I parsed the old-values in select and option-inputs.

Please or to participate in this conversation.