в каждом классе есть
Код: Выделить всё
public $field='value';
public static function find()
{
return new ClassQuery(get_called_class());
}
Код: Выделить всё
if (Yii::$app->user->identity->group == User::ROLE_USER) {
$field = str_replace('val1', 'val2', $this->field);
$query->andWhere(['>=', $field, 1]);
$query->andWhere(['<=', $field, 2]);
}
как сделать?