diff --git a/src/ControllerTrait.php b/src/ControllerTrait.php index 4b90d2a..341edeb 100644 --- a/src/ControllerTrait.php +++ b/src/ControllerTrait.php @@ -226,12 +226,6 @@ trait ControllerTrait { #[Ignore] public function isRoute(mixed $name, ServerRequestInterface $request) : bool { - foreach((array) $name as $item) { - if ( fnmatch($item, $request->getAttribute('lean.route')->name) ) { - return true; - } - } - - return false; + return $request->getAttribute('lean.route')->match($name); } } diff --git a/src/Lean.php b/src/Lean.php index 01a7998..6bd50ba 100644 --- a/src/Lean.php +++ b/src/Lean.php @@ -1,6 +1,5 @@