コード例 #1
0
 public function actionDelete($id = null)
 {
     if ($id) {
         RealtyProperties::deleteAll(['id' => $id]);
         Yii::$app->getSession()->setFlash('success', 'Удалено');
     }
     return $this->redirect(['index']);
 }
コード例 #2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getRealtyProperties()
 {
     return $this->hasMany(RealtyProperties::className(), ['realty_property_types_id' => 'id']);
 }