<?php
namespace app\modules\admin\assets;
class AdminAsset extends \yii\web\AssetBundle
{
public $sourcePath = '@app/modules/admin/static';
public $publishOptions = ['forceCopy' => true];
public $css = [
'css/style.css'
];
public $js = [
'js/main.js'
];
public $depends = [
'yiister\adminlte\assets\Asset'
];
}
public $params;
$this->params=123;
echo $this->params;
$sql='UPDATE users SET last_update='.time().' where id_user='.Yii::app()->user->id;
Yii::app()->db->createCommand($sql)->execute();
$users=Users::model()->findAll([
'condition'=>'t.last_update > :time',
'params'=>[':time'=>time()-(60*60*15)], // 15 минут
]);
public $data;
public function init(){
$this->data=[Выбираем то, что нужно]
}
$this->data;