Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: AUREO SOUTO
Added: Dec 20, 2018 11:53 AM
Views: 19
Tags: no tags
  1.  public function actionDelete($id)
  2.     {
  3.         if($this->findModel($id)->delete()){
  4.              return $this->redirect(['index']);
  5.         }else {
  6.             header("HTTP/1.0 400 Relation Restriction");
  7.         }
  8.     }