We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error:"Request must accept a json response."
public function handle($request, Closure $next, $tokenType = 'api_token', $guard = 'jwt') { // if ($request->ajax() || $request->wantsJson()) { if (($errors = Auth::guard($guard)->validateToken($tokenType)) === true ) { if (Auth::guard($guard)->tokenIsApi()) { if (Auth::guard($guard)->guest()) { return response()->json('Unauthorized.', 401); } } } else { return response()->json(['error' => $errors['message']], $errors['code']); } // } else { // return response()->json(['error' =>'Request must accept a json response.'], 422); // } return $next($request); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
error:"Request must accept a json response."
The text was updated successfully, but these errors were encountered: