summaryrefslogtreecommitdiff
path: root/src/Router.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Router.php')
-rw-r--r--src/Router.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/Router.php b/src/Router.php
index 62ac52f..46eadd8 100644
--- a/src/Router.php
+++ b/src/Router.php
@@ -125,13 +125,15 @@ class Router
return $this->strategy->notFound($request);
}
- $call = new RouteCall(
+ return $this->strategy->runMiddleware(
$request,
- $match->route,
- $match->segmentMatch->parameters,
+ [],
+ fn ($request) => $this->strategy->runRoute(new RouteCall(
+ $request,
+ $match->route,
+ $match->segmentMatch->parameters,
+ ))
);
-
- return $this->strategy->runRoute($call);
}
public function make(