mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-17 00:37:52 +00:00
Merge pull request #87 from skipperbent/development
[BUGFIX] Fixed only match group route if prefix is set
This commit is contained in:
@@ -87,7 +87,7 @@ class RouterBase {
|
||||
$group = $route;
|
||||
|
||||
// Load middleware on group if route matches
|
||||
if($route->matchRoute($this->request)) {
|
||||
if($route->getPrefix() !== null && $route->matchRoute($this->request)) {
|
||||
$route->loadMiddleware($this->request);
|
||||
}
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ class SimpleRouter {
|
||||
* Adds get + post route
|
||||
*
|
||||
* @param string $url
|
||||
* @param function $callback
|
||||
* @param callable $callback
|
||||
* @param array|null $settings
|
||||
* @return RouterRoute
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user