backend/controllers/MenusController.php
/**
     * Displays a single Menus model.
     * @param integer $id
     * @return mixed
     * @throws NotFoundHttpException if the model cannot be found
     */
Displays a single Menus model.
@param integer $id
@return mixed
@throws NotFoundHttpException if the model cannot be found
Displays a single Menus model . @param integer $id @return mixed @throws NotFoundHttpException if the model cannot be found
public function actionView($id)
    {
        $dishes = Dishes::find()->where(['menuId' => $id])->all();
        return $this->render('view', [
            'model' => $this->findModel($id),
            'dishes' => $dishes
        ]);
    }
public function actionView ( $ id ) { $ dishes = Dishes :: find ( ) -> where ( [ 'menuId' => $ id ] ) -> all ( ) ; return $ this -> render ( 'view' , [ 'model' => $ this -> findModel ( $ id ) , 'dishes' => $ dishes ] ) ; }
Displays a single Menus model.
Displays a single Menus model .