after updating you should redirect to a new page and not return a view
Jul 22, 2017
2
Level 4
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?
Please or to participate in this conversation.