route->uri, '{table}/{action}'); } /** * @param ExtractedEndpointData $endpointData * @param array $routeRules * @return array|null */ public function __invoke(ExtractedEndpointData $endpointData, array $routeRules = []): ?array { // Get HTTP methods for this endpoint $httpMethods = $endpointData->httpMethods ?? []; // Check if the first method (primary method) is GET or HEAD // Scribe creates separate endpoints for each HTTP method if (count($httpMethods) > 0) { $primaryMethod = strtoupper($httpMethods[0]); // If primary method is GET or HEAD, remove body parameters if (in_array($primaryMethod, ['GET', 'HEAD']) && count($endpointData->bodyParameters) > 0) { // Return empty array to remove body parameters return []; } } // Otherwise, return null to keep existing body parameters return null; } }