芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/myvyralapp.com/bck/app/Http/Middleware/ApiAuthenticator.php
auth->guard('api')->check()) { return $this->auth->shouldUse('api'); } throw new UnauthorizedException('sorry'); } /** * Handle an unauthenticated user. * * @param \Illuminate\Http\Request $request * @param array $guards * @return \Illuminate\Http\JsonResponse * * @throws \Illuminate\Validation\UnauthorizedException */ public function handle($request, Closure $next, ...$guards) { try { $this->authenticate($request, $guards); } catch (UnauthorizedException $e) { $message = ['error'=>['Sorry, You are unauthorized user']]; return Helpers::unauthorized($data = null, $message); } return $next($request); } }