/** * @return \yii\db\ActiveQuery */ public function getTraType() { return $this->hasOne(TypeTravel::className(), ['id' => 'tra_type']); }
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]); }