浏览代码

Permission::error接口bug修复

Jiang qinghua 6 年之前
父节点
当前提交
832225e8d8
共有 1 个文件被更改,包括 3 次插入3 次删除
  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')))
+        );
     }
 
     /**