Cookie library for Yii2 framework - very easy and powerfull
In Yii Advanced go to path:
common\config\main.php
And in Yii Basic go to path:
config\main.php
Add component to component
array:
[
'components'=>
[
'cookie'=>YiiMan\YiiLibCookie\lib\cookie::class
]
]
Now you can call component like this:
Yii::$app->cookie
Just do :
Yii::$app->cookie->newKey='new value';
Just do :
$value=Yii::$app->cookie->newKey