Answer the question
In order to leave comments, you need to log in
Why does laravel create a new session on every request?
Hello, I am trying to save data in a session
$data = \request()->session()->all(); // тут только _token и он каждый раз новый
$arCart = self::getCart(); // тут пусто
$arCart[$id] = (isset($arCart[$id]) ? $arCart[$id] : 0) + $quantity;
session(['cart' => $arCart]);
$arCart = self::getCart(); // тут уже не пусто
protected $except = [
'/*'
];
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question