bossit/yii2-favourite

There is no license information available for the latest version (1.0.2) of this package.

Favourite component for Yii2

Maintainers

👁 bossit

Package info

github.com/bossit/yii2-favourite

Type:yii2-extension

pkg:composer/bossit/yii2-favourite

Statistics

Installs: 933

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.2 2019-02-22 09:46 UTC

Requires

Requires (Dev)

None

Suggests

None

Provides

None

Conflicts

None

Replaces

None

Unknown License a375a549fac6eecf7c7b9c09e3cf12d65bc284a6

yii2favourite

This package is auto-updated.

Last update: 2026-06-23 04:03:24 UTC


README

Favourite component for Yii2.

👁 Latest Stable Version
👁 Build Status
👁 Total Downloads

Install

The preferred way to install this component is through composer.

$ composer require bossit/yii2-favourite:^1.0 

Usage

The preferred way is to setup the components into our Application's configuration array:

'components' => [
 'favourite' => [
 'class' => \bossit\logger\FavouriteService::class,
 'lifetime' => 31536000,
 'cookieName' => 'favourite'
 ],
],

That's it, you are ready to use it as Yii2 components.

Examples:
// add to favourite
\Yii::$app->favourite->add($productId);

// remove from favourite
\Yii::$app->favourite->remove($productId);

// get items of favourite
\Yii::$app->favourite->getItems();