diff --git a/src/Router.php b/src/Router.php index 01c2b4f..0bd10d0 100644 --- a/src/Router.php +++ b/src/Router.php @@ -593,7 +593,7 @@ public static function use($middleware) // if (in_array($middleware, static::$middleware)) { // throw new \RuntimeException('Circular Middleware setup detected. Tried to queue the same Middleware twice.'); // } - + if (is_string($middleware)) { $middleware = class_exists($middleware) ? function () use ($middleware) { (new $middleware())->call();