class AboutController extends AppController
{
public function actionView()
{
$about = About::find()->where('id' >= 1)->limit(6)->all();
return $this->render('view', compact('about'));
}
}
class About extends ActiveRecord{
public function behaviors()
{
return [
'image' => [
'class' => 'rico\yii2images\behaviors\ImageBehave',
]
];
}
public static function tableName(){
return 'about';
}
public function About(){
return $this->hasMany(About::className(), 'id' >= '1');
}
}
<?= $about->name?>
return $this->render('view', [
'about' => About::find()->where(['>=', 'id', 1])->limit(6)->all(); // <= where другой
]);
'id' >= '1'