Код: Выделить всё
public function to_session()
{
$session = Yii::$app->session;
$session->set('last_name', $this->last_name);
$session->set('first_name', $this->first_name);
$session->set('city', $this->city);
$session->set('phone', $this->phone);
$session->set('user_id', $this->user_id);
}
Код: Выделить всё
public function beforeAction($action)
{
$this->enableCsrfValidation = false;
return parent:: beforeAction($action);
}
При переходе к другому action и controller данные в сессии исчезают ) что я делаю не так ?