4
0
Fork 0

更新 'src/Http/Auth/Permission.php'

master
panliang 2022-09-23 11:05:22 +08:00
parent f45495b6fb
commit 0f60563460
1 changed files with 2 additions and 2 deletions

View File

@ -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)
);
}