Exemplo n.º 1
0
 public function destroy($id)
 {
     $travel = Travel::find($id);
     if ($travel) {
         $travel->delete();
         flash('Элемент удалён');
         return Redirect::back();
     }
     flash('Ошибка');
     return Redirect::back();
 }
Exemplo n.º 2
0
 public function actionSingle_travel($id)
 {
     $this->layout = 'bank';
     $id_travel = $id - 1;
     $travel = Travel::find()->all();
     $type_travel = TypeTravel::find()->all();
     $image = ImageTravel::find()->all();
     $id_image = IdImgTravel::find()->all();
     $idPathImage = IdImgTravel::find()->where(['travel_id' => $id])->all();
     return $this->render('single_travel', ['id_travel' => $id_travel, 'travel' => $travel, 'image' => $image, 'id_image' => $image, 'idPathImage' => $idPathImage, 'type_travel' => $type_travel]);
 }
Exemplo n.º 3
0
 public function actionView_travel()
 {
     $travel = Travel::find()->all();
     return $this->render('view_travel', ['tv' => $travel]);
 }