delete.stub 396 B

123456789101112131415161718
  1. /**
  2. * 删除
  3. * @param $id
  4. * @return \think\Response
  5. * @date {%DATE%}
  6. */
  7. public function delete($id)
  8. {
  9. if (!$id) {
  10. return app('json')->fail(100100);
  11. }
  12. if ($this->service->destroy((int)$id)) {
  13. return app('json')->success(100002);
  14. } else {
  15. return app('json')->success(100008);
  16. }
  17. }