Merge pull request #589 from whitman/numeric-routes

Automatically wrap numeric routes in parentheses
This commit is contained in:
Taylor Otwell
2012-05-03 06:36:08 -07:00

View File

@@ -174,6 +174,7 @@ class Router {
*/
public static function register($method, $route, $action)
{
if (ctype_digit($route)) $route = "({$route})";
if (is_string($route)) $route = explode(', ', $route);
// If the developer is registering multiple request methods to handle