2017 © Pedro Peláez
 

yii2-extension yii2-recently-viewed-behavior

yii2 recently viewed behavior

image

zacksleo/yii2-recently-viewed-behavior

yii2 recently viewed behavior

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

yii2-recently-viewed-behavior

StyleCI Build Status Code Climate Scrutinizer Code Quality Code Coverage, (*1)

Quick Start

Install

  composer install zacksleo/yii2-recently-viewed-behavior

Usage


use yii\web\Controller; use zacksleo\yii2\behaviors\RecentlyViewedBehavior; class DefaultController extends Controller { public function behaviors() { return [ 'recentlyViewed' => [ 'class' => RecentlyViewedBehavior::className(), 'limit' => 5, // Limit the number of recently viewed items stored. 0 = no limit. ], ]; } public function actionView($id) { // set recently models $model = $this->findModel($id); $this->setRecentlyViewed(get_class($model), $id); // get recently models $this->getRecentlyViewed(get_class($model)); }

The Versions

06/07 2018

dev-master

9999999-dev

yii2 recently viewed behavior

  Sources   Download

MIT

The Requires

 

The Development Requires

27/08 2017

1.0.0

1.0.0.0

yii2 recently viewed behavior

  Sources   Download

MIT

The Requires

 

The Development Requires