Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -95,7 +95,12 @@ public function getIterator() | |
*/ | ||
public function count() | ||
{ | ||
return count($this->routes->all()); | ||
$count = 0; | ||
foreach ($this->routes as $route) { | ||
$count += $route instanceof RouteCollection ? count($route) : 1; | ||
} | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
stof
Member
|
||
|
||
return $count; | ||
} | ||
|
||
/** | ||
|
what if a route is redefined using the same name to replace a previous route ?