PHP code example of tugmaks / yii2-lastseen
1. Go to this page and download the library: Download tugmaks/yii2-lastseen library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
tugmaks / yii2-lastseen example snippets
'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()'),
]
php composer.phar