Skip to content
This repository has been archived by the owner on Feb 23, 2023. It is now read-only.

Commit

Permalink
fix: Fix Route Parameter not match.
Browse files Browse the repository at this point in the history
  • Loading branch information
medz committed Mar 16, 2018
1 parent 39ad437 commit 26def64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Laravel/Middleware/Cors.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ protected function hasShouldRouteGroup($request): bool
$shouldClsssName = ShouldGroup::class;
$shouldAlias = collect(Route::getMiddleware())->flip()->get($shouldClsssName, $shouldClsssName);
$gatherMiddleware = collect(Route::getRoutes()->get())->first(function ($route) use ($request) {
return $route->uri() === $request->path();
return $route->matches($request, false);
})->gatherMiddleware();

if (in_array($shouldClsssName, $gatherMiddleware) || in_array($shouldAlias, $gatherMiddleware)) {
Expand Down

0 comments on commit 26def64

Please sign in to comment.