yiiman / yii-lib-cookie
Cookie library for Yii2 and Yii3 framework - very easy and powerfull
Installs: 70
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/yiiman/yii-lib-cookie
Requires
- php: >=7.0
- ext-json: *
- yiiman/yii-module-setting: 0.0.2
- yiisoft/yii2: 2.0.*
README
Cookie library for Yii2 framework - very easy and powerfull
Set Component
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
Set value to cookie
Just do :
Yii::$app->cookie->newKey='new value';
Get saved value
Just do :
$value=Yii::$app->cookie->newKey