Skip to content

Commit ace1e0e

Browse files
committed
1 parent c794448 commit ace1e0e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/RouteInformation.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class RouteInformation
2424
public ?string $name;
2525
public string $controller;
2626

27-
public array $parameters;
27+
public Collection $parameters;
2828

2929
/** @var Collection|Attribute[] */
3030
public Collection|array $controllerAttributes;
@@ -62,10 +62,10 @@ public static function createFromRoute(Route $route): mixed
6262
}
6363

6464
preg_match_all('/{(.*?)}/', $route->uri, $parameters);
65-
$parameters = $parameters[1];
65+
$parameters = collect($parameters[1]);
6666

6767
if (count($parameters) > 0) {
68-
$parameters = collect($parameters)->map(static fn($parameter) => [
68+
$parameters = $parameters->map(static fn($parameter) => [
6969
'name' => Str::replaceLast('?', '', $parameter),
7070
'required' => ! Str::endsWith($parameter, '?'),
7171
]);

0 commit comments

Comments
 (0)