mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-07-11 22:12:18 +00:00
[FEATURE] If no parameters are specified in the route, getRoute will now
add the parameters provided to the method instead.
This commit is contained in:
@@ -230,6 +230,11 @@ class RouterBase {
|
|||||||
$url = str_ireplace('{' . $param. '}', $value, $url);
|
$url = str_ireplace('{' . $param. '}', $value, $url);
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// If no parameters are specified in the route, assume that the provided parameters should be used.
|
||||||
|
if(count($parameters)) {
|
||||||
|
$url .= join('/', $parameters);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user