tugmaks/yii2-lastseen
Composer 安装命令:
composer require tugmaks/yii2-lastseen
包简介
Automatically fills last activity time for current user
关键字:
README 文档
README
Automatically fills last activity time for current user
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist tugmaks/yii2-lastseen "0.2"
or add
"tugmaks/yii2-lastseen": "0.3"
to the require section of your composer.json file.
Usage
Once the behavior is installed, simply use it in your code by adding this lines to application config:
'as lastSeen'=>[ 'class'=>'tugmaks\behaviors\LastSeen\LastSeenBehavior', 'lastSeenAttribute'=>'last_seen' // attribute that stores last seen time in user table // uncomment this line if you store last seen as datetime, by default beahavior saves as unixtime //'value'=> new \yii\db\Expression('NOW()'), ]```
统计信息
- 总下载量: 264
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-12-09