Skip to content

Commit

Permalink
Merge pull request #265 from urbsny/patch-5
Browse files Browse the repository at this point in the history
Support customizing the route key.
  • Loading branch information
shalvah authored Jul 5, 2021
2 parents c292d88 + 49ab18a commit 6ae5e7c
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ public function __invoke(ExtractedEndpointData $endpointData, array $routeRules)
continue;
}

$type = $this->normalizeTypeName($argumentInstance->getKeyType());
$typeName = $argumentInstance->getKeyName() === $argumentInstance->getRouteKeyName()
? $argumentInstance->getKeyType() : 'string';
$type = $this->normalizeTypeName($typeName);
$parameters[$paramName]['type'] = $type;

// If the user explicitly set a `where()` constraint, use that to refine examples
Expand Down

0 comments on commit 6ae5e7c

Please sign in to comment.