芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/kwesioben.com/paymoney/app/Http/Middleware/CheckPermission.php
permission = $permission; } public function handle($request, Closure $next, $permissions) { $prefix = str_replace('/', '', request()->route()->getPrefix()); if ($prefix == config('adminPrefix')) { $gaurd_type = auth('admin')->user()->id; } else { $gaurd_type = \Auth::user()->id; } if ($this->permission->has_permission($gaurd_type, $permissions)) { return $next($request); } else { if (str_contains($prefix, 'apiv2')) { return $this->forbiddenResponse([], __("Unauthorized")); } return response()->view('admin.errors.404', [], 404); } } }