/** * @return \yii\db\ActiveQuery */ public function getVehicle() { return $this->hasOne(Vehicle::className(), ['id' => 'vehicle_id']); }
/** * Deletes an existing Vehicle model. * If deletion is successful, the browser will be redirected to the 'index' page. * @param integer $id * @return mixed */ public function actionDelete($id) { $this->findModel(Vehicle::className(), $id)->delete(); return $this->redirect(['index']); }