modules/api/v2/controllers/UserBankDetailsController.php
/**
     * Deletes an existing UserBankDetails model.
     * If deletion is successful, the browser will be redirected to the 'index' page.
     * @param integer $id
     * @return mixed
     * @throws NotFoundHttpException if the model cannot be found
     */
Deletes an existing UserBankDetails model.
If deletion is successful, the browser will be redirected to the 'index' page.
@param integer $id
@return mixed
@throws NotFoundHttpException if the model cannot be found
Deletes an existing UserBankDetails model . If deletion is successful the browser will be redirected to the ' index ' page . @param integer $id @return mixed @throws NotFoundHttpException if the model cannot be found
public function actionDelete($id)
    {
        $model = UserBankDetails::find()->where(['id' => $id])->one();
        if (!$model instanceof UserBankDetails || $model->user_id != Yii::$app->user->identity->id) {
            throw new NotFoundHttpException('User bank detail doesn\'t exist.');
        }
        $model->delete();
    }
public function actionDelete ( $ id ) { $ model = UserBankDetails :: find ( ) -> where ( [ 'id' => $ id ] ) -> one ( ) ; if ( ! $ model instanceof UserBankDetails || $ model -> user_id != Yii :: $ app -> user -> identity -> id ) { throw new NotFoundHttpException ( 'User bank detail doesn\'t exist.' ) ; } $ model -> delete ( ) ; }
Deletes an existing UserBankDetails model.
Deletes an existing UserBankDetails model .