protected function findModel($id) { if (($model = SongOrder::findOne($id)) !== null) { return $model; } else { throw new NotFoundHttpException('The requested page does not exist.'); } }
/** * @inheritdoc */ public function getSongOrder() { return $this->hasMany(SongOrder::className(), ['room_id' => 'id']); }