コード例 #1
0
ファイル: crudController.php プロジェクト: avbdr/tinymvc-php
 public function rm($id)
 {
     if (!$id) {
         return;
     }
     $this->can(TinyMvc::App()->controller . '/rm', $id);
     $model = new $this->modelName();
     $model = $model::byId($id);
     $model->delete();
     $this->flash("Changes were saved", "success");
     $this->redirect($this->successUrl);
 }