controllers/AddressController.php
public function actionDelete($id)
    {
        $date = new DateTime('now');
        $model = $this->findModel($id);
        $model->deleted_at = $date->format("U");
        $model->save();

        return $this->redirect(['index']);
    }
public function actionDelete($id)
    {
        $date = new DateTime('now');
        $model = $this->findModel($id);
        $model->deleted_at = $date->format("U");
        $model->save();

        return $this->redirect(['index']);
    }
public function actionDelete ( $ id ) { $ date = new DateTime ( 'now' ) ; $ model = $ this -> findModel ( $ id ) ; $ model -> deleted_at = $ date -> format ( "U" ) ; $ model -> save ( ) ; return $ this -> redirect ( [ 'index' ] ) ; }
Deletes an existing Address model.
If deletion is successful, the browser will be redirected to the 'index' page.
@param integer $id
@return mixed
Deletes an existing Address model . If deletion is successful the browser will be redirected to the index page .