'attributes'=>[PDO::ATTR_STRINGIFY_FETCHES => true],
->select([
'id',
'parent_id',
'type',
'TO_CHAR(text) AS text',
'status',
'client_file',
'client',
'create_at'
])
public function beforeAction($action){
$user_action = $action->controller->id.'/'.$action->id;
if (!in_array($user_action, Yii::$app->user->identity['rols']) && Yii::$app->controller->id != 'default' ) {
$this->redirect(['/admin/default/error']);
return false;
}
return parent::beforeAction($action);
}