App\Exceptions\UnauthorizedExceptionHandler::handle PHP Метод

handle() публичный Метод

public handle ( UnauthorizedHttpException $exception ) : mixed
$exception Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException
Результат mixed
    public function handle(UnauthorizedHttpException $exception)
    {
        return Response::make(['errors' => ['status' => '401', 'code' => 'AuthenticationFailed', 'title' => 'Authentication Failed', 'detail' => 'Failed to authenticate because of bad credentials or an invalid authorization header.', 'source' => ['parameter' => 'Authentication-header']]], 401);
    }
UnauthorizedExceptionHandler