From 0f6056346062e38cfca4aa3bfd81549d0003c555 Mon Sep 17 00:00:00 2001 From: panliang <1163816051@qq.com> Date: Fri, 23 Sep 2022 11:05:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'src/Http/Auth/Permission.?= =?UTF-8?q?php'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Http/Auth/Permission.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Http/Auth/Permission.php b/src/Http/Auth/Permission.php index 1e37c2f..10e6dd8 100644 --- a/src/Http/Auth/Permission.php +++ b/src/Http/Auth/Permission.php @@ -86,7 +86,7 @@ class Permission * * @throws \Illuminate\Http\Exceptions\HttpResponseException */ - public static function error() + public static function error($ability = null) { if ($error = static::$errorHandler) { admin_exit($error()); @@ -97,7 +97,7 @@ class Permission } admin_exit( - Content::make()->withError(trans('admin.deny')) + Content::make()->withError(trans('admin.deny') . ':' . $ability) ); }