application/manage/controller/Menu.php
public function delMenu(Request $request)
    {
        $menu_id = $request->param('menu_id');
        if (empty($menu_id)) {
            return $this->error('菜单ID为空');
        }
        $menu_model = MenuLogic::model();
        
        // 检查子菜单
        $map = [
            'menu_pid' => $menu_id
        ];
        $menu = $menu_model->where($map)->find();
        if (! empty($menu)) {
            return $this->error('请先删除该菜单下的子菜单');
        }
        
        // 删除菜单
        $menu_model->del($menu_id);
        
        return $this->success('删除菜单成功');
    }
public function delMenu(Request $request)
    {
        $menu_id = $request->param('menu_id');
        if (empty($menu_id)) {
            return $this->error('菜单ID为空');
        }
        $menu_model = MenuLogic::model();
        
        // 检查子菜单
        $map = [
            'menu_pid' => $menu_id
        ];
        $menu = $menu_model->where($map)->find();
        if (! empty($menu)) {
            return $this->error('请先删除该菜单下的子菜单');
        }
        
        // 删除菜单
        $menu_model->del($menu_id);
        
        return $this->success('删除菜单成功');
    }
删除菜单

@param Request $request
@return mixed