Answer the question
In order to leave comments, you need to log in
How to get cookie value on ajax request in Yii2?
I'm trying to get a cookie with:
Yii::$app->request->cookies->get(Partner::TRACK_TAG)->value
2
public function actionCookie()
public function actionCookie()
{
var_dump(Yii::$app->request->cookies->get(Partner::TRACK_TAG)->value);
die;
}
6b8dac707515065fcc82a1ba3d9f8f4937bd2bffd5e3741be410e80ef7824924a:2:{i:0;s:1:"p";i:1;s:1:"2";}
<input type="hidden" name="_csrf-frontend" value="<?= Yii::$app->request->csrfToken ?>">
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