slam / yii2-js-cookie
Asset Bundle for Yii2 with JavaScript Cookie.
Fund package maintenance!
Slamdunk
paypal.me/filippotessarotto
Installs: 6 338
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 2
Type:yii-extension
Requires
- bower-asset/js-cookie: ^2.0
- yiisoft/yii2: *
This package is auto-updated.
Last update: 2024-11-07 00:53:20 UTC
README
This extension provides an assets bundle with JavaScript Cookie for Yii framework 2.0 applications.
Installation
The preferred way to install this extension is through composer.
Either run
$ php composer.phar require webtoucher/yii2-js-cookie "*"
or add
"webtoucher/yii2-js-cookie": "*"
to the require
section of your composer.json
file.
Usage
In view
webtoucher\cookie\AssetBundle::register($this);
or as dependency in your main application asset bundle
class AppAsset extends AssetBundle { // ... public $depends = [ // ... '\webtoucher\cookie\AssetBundle' ]; }
Then you can use Cookies in your scripts. Please read project documentation for more information.