Найден 1 результат

pogranpv
2021.02.02, 22:24
Форум: Общие вопросы (Yii 2.x)
Тема: active record with и limit
Ответы: 0
Просмотры: 674

active record with и limit

здравствуйте, не могу добавить лимит толково для activeRecord делаю вот так return Book::find() ->with('chapters') ->where(['>= ', 'book.id', 1]) ->andWhere(['<=', 'book.id', 2]) ->all(); и в модели public function getChapters($short = false) { return $this->hasMany($short ? ChapterShort::className(...