webtoucher/yii2-js-cookie

Asset Bundle for Yii2 with JavaScript Cookie.

Installs: 66 889

Dependents: 1

Suggesters: 0

Security: 0

Stars: 1

Watchers: 2

Forks: 2

Open Issues: 0

Type:yii-extension

1.0.0 2016-03-14 18:49 UTC

This package is auto-updated.

Last update: 2024-12-14 22:30:11 UTC


README

This extension provides an assets bundle with JavaScript Cookie for Yii framework 2.0 applications.

Latest Stable Version Total Downloads Daily Downloads Latest Unstable Version License

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.