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