Browse Source

Permission::error接口bug修复

Jiang qinghua 6 years ago
parent
commit
832225e8d8
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/Auth/Permission.php

+ 3 - 3
src/Auth/Permission.php

@@ -87,13 +87,13 @@ class Permission
      */
     public static function error()
     {
-        $response = response((new Content)->withError(trans('admin.deny')));
-
         if (!request()->pjax() && request()->ajax()) {
             abort(403, trans('admin.deny'));
         }
 
-        Pjax::respond($response);
+        Pjax::respond(
+            response((new Content)->withError(trans('admin.deny')))
+        );
     }
 
     /**