1
I have a problem with how to change the session variable in Laravel. When the user logs in, some variables are set in the session, one of them is the user name. In a given form, there is the option to change the user data, if he changes the name, the value that was set in the session should be changed but I do not know how to do it.
session(
[
'id_usuario' => $usuario[0]->id_user,
'usuario' => $usuario[0]->nome
]
);
How I change the session array user field?
For it is Isac, when I refresh the page, the session is terminated, thus, not counting that if I do dd(Session('Blabla')) it returns null.
– user60485
@Felipepaz and
dd(session()->all());
anddd($usuario)
give what ?– Isac
Simply gives null for all session data.
– user60485
@Felipepaz and
dd($usuario)
gives what ?– Isac