Automatically wrap numeric routes in parentheses

This commit is contained in:
Alex Whitman 2012-04-26 16:32:02 +01:00
parent 3a62036a9c
commit 14961350d0
1 changed files with 1 additions and 0 deletions

View File

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