From 71834da8c6f7b24b0c15c57556e053ccd671aa3a Mon Sep 17 00:00:00 2001 From: Sam Light Date: Wed, 10 Jun 2026 19:00:33 +0100 Subject: Ensure dispatch runs middleware method --- src/Router.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src') 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( -- cgit v1.2.3