|
|
@@ -114,12 +114,12 @@ class Menu extends Controller
|
|
|
*/
|
|
|
public function destroy()
|
|
|
{
|
|
|
-// return $this->error(HttpStatus::CUSTOM_ERROR, '禁止删除');
|
|
|
+ return $this->error(HttpStatus::CUSTOM_ERROR, '禁止删除');
|
|
|
$id = request()->post('id');
|
|
|
// 示例:通过 ID 删除菜单
|
|
|
$info = MenuService::findOne(['id' => $id]);
|
|
|
if (!$info) {
|
|
|
- return $this->error(0, '菜单不存在');
|
|
|
+ return $this->error(HttpStatus::CUSTOM_ERROR, '菜单不存在');
|
|
|
}
|
|
|
|
|
|
$info->delete();
|