diff --git a/src/SegmentRouterTrait.php b/src/SegmentRouterTrait.php index 7266a8c..4763b2c 100644 --- a/src/SegmentRouterTrait.php +++ b/src/SegmentRouterTrait.php @@ -86,6 +86,7 @@ trait SegmentRouterTrait }, [] ); + var_dump($params); // if we found a handler for the method, return it and any params. if not, return a 405 return isset($node[$method]) diff --git a/tests/test.php b/tests/test.php index 3c0f945..ee3c66d 100644 --- a/tests/test.php +++ b/tests/test.php @@ -88,7 +88,7 @@ for ($i = 0; $i < 10; $i++) { $res = SegmentRouter::lookup($routes, $method, $uri); if ($res['code'] !== 200) { - echo "Failed to handle request for $uri - $res\n"; + echo "Failed to handle request for $uri - " . json_encode($res) . "\n"; exit(1); } $res['handler'](...$res['params']);