chore(router): Remove redundant middleware count check
This commit is contained in:
@@ -257,11 +257,9 @@ class Router
|
||||
static::$$method[] = static::parse($path, $callback);
|
||||
static::$last = [$method, count(static::$$method) - 1];
|
||||
|
||||
if (count(static::$withMiddlewares) > 0) {
|
||||
foreach (static::$withMiddlewares as $middleware) {
|
||||
static::middleware($middleware);
|
||||
}
|
||||
}
|
||||
|
||||
return new static();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user