/** * @return \yii\db\ActiveQuery */ public function getPages() { return $this->hasMany(Pages::className(), ['categories_id' => 'id']); }