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