getHeaderLine('Accept'); if (str_contains($accept, 'application/vnd.api+json')) { $format = 'jsonapi'; } return $handler->handle($request->withAttribute(self::ATTR_API_FORMAT, $format)); } }