From 909a1e0657d794bdf67e71fd8698922c456a8703 Mon Sep 17 00:00:00 2001 From: panliang <1163816051@qq.com> Date: Mon, 11 Dec 2023 11:57:18 +0800 Subject: [PATCH] party --- app/Admin/Services/PartyCateService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Admin/Services/PartyCateService.php b/app/Admin/Services/PartyCateService.php index 4573448..88a7e3c 100644 --- a/app/Admin/Services/PartyCateService.php +++ b/app/Admin/Services/PartyCateService.php @@ -69,7 +69,7 @@ class PartyCateService extends BaseService $permissions = Cache::get('parte_cate_id_permission', function () use ($user) { return $user->allPermissions()->where(fn ($item) => Str::startsWith($item->slug, 'party_cate_') && $item->http_method)->pluck('http_method')->all(); }); - return $permissions; + return count($permissions) == 0 ? [0] : $permissions; } public function preDelete(array $ids)