Methods summary
public static
|
#
secure( string $method, string|array $route, mixed $action )
Register a HTTPS route with the router.
Register a HTTPS route with the router.
Parameters
- $method
string $method
- $route
string|array $route
- $action
mixed $action
|
public static
|
#
share( array $routes, mixed $action )
Register many request URIs to a single action.
Register many request URIs to a single action.
Router::share(array(array('GET', '/'), array('POST', '/')), 'home@index');
Parameters
- $routes
array $routes
- $action
mixed $action
|
public static
|
#
group( array $attributes, Closure $callback )
Register a group of routes that share attributes.
Register a group of routes that share attributes.
Parameters
- $attributes
array $attributes
- $callback
Closure
$callback
|
public static
|
#
register( string $method, string|array $route, mixed $action )
Register a route with the router.
Register a route with the router.
Router::register('GET', '/', function() {return 'Home!';});
Router::register(array('GET', '/', 'GET /home'), function() {return 'Home!';});
Parameters
- $method
string $method
- $route
string|array $route
- $action
mixed $action
|
protected static
array
|
#
action( mixed $action )
Convert a route action to a valid action array.
Convert a route action to a valid action array.
Parameters
Returns
array
|
public static
|
#
secure_controller( string|array $controllers, string|array $defaults = 'index' )
Register a secure controller with the router.
Register a secure controller with the router.
Parameters
- $controllers
string|array $controllers
- $defaults
string|array $defaults
|
public static
|
#
controller( string|array $controllers, string|array $defaults = 'index', boolean $https = null )
Register a controller with the router.
Register a controller with the router.
Parameters
- $controllers
string|array $controllers
- $defaults
string|array $defaults
- $https
boolean $https
|
protected static
|
#
root( string $identifier, string $controller, string $root )
Register a route for the root of a controller.
Register a route for the root of a controller.
Parameters
- $identifier
string $identifier
- $controller
string $controller
- $root
string $root
|
public static
array
|
#
find( string $name )
Find a route by the route's assigned name.
Find a route by the route's assigned name.
Parameters
Returns
array
|
public static
array
|
#
uses( string $action )
Find the route that uses the given action.
Find the route that uses the given action.
Parameters
Returns
array
|
public static
Laravel\Routing\Route
|
#
route( string $method, string $uri )
Search the routes for the route matching a method and URI.
Search the routes for the route matching a method and URI.
Parameters
- $method
string $method
- $uri
string $uri
Returns
|
protected static
Laravel\Routing\Route
|
#
match( string $method, string $uri )
Iterate through every route to find a matching route.
Iterate through every route to find a matching route.
Parameters
- $method
string $method
- $uri
string $uri
Returns
|
protected static
string
|
#
wildcards( string $key )
Translate route URI wildcards into regular expressions.
Translate route URI wildcards into regular expressions.
Parameters
Returns
string
|
public static
array
|
#
routes( )
Get all of the registered routes, with fallbacks at the end.
Get all of the registered routes, with fallbacks at the end.
Returns
array
|
public static
array
|
#
method( string $method )
Grab all of the routes for a given request method.
Grab all of the routes for a given request method.
Parameters
Returns
array
|
public static
array
|
#
patterns( )
Get all of the wildcard patterns
Get all of the wildcard patterns
Returns
array
|
protected static
string
|
#
repeat( string $pattern, integer $times )
Get a string repeating a URI pattern any number of times.
Get a string repeating a URI pattern any number of times.
Parameters
- $pattern
string $pattern
- $times
integer $times
Returns
string
|
Properties summary
public static
array
|
$names
|
array() |
#
The route names that have been matched.
The route names that have been matched.
|
public static
array
|
$uses
|
array() |
#
The actions that have been reverse routed.
The actions that have been reverse routed.
|
public static
array
|
$routes
|
array(
'GET' => array(),
'POST' => array(),
'PUT' => array(),
'DELETE' => array(),
'PATCH' => array(),
'HEAD' => array(),
'OPTIONS'=> array(),
) |
#
All of the routes that have been registered.
All of the routes that have been registered.
|
public static
array
|
$fallback
|
array(
'GET' => array(),
'POST' => array(),
'PUT' => array(),
'DELETE' => array(),
'PATCH' => array(),
'HEAD' => array(),
'OPTIONS'=> array(),
) |
#
All of the "fallback" routes that have been registered.
All of the "fallback" routes that have been registered.
|
public static
mixed
|
$group
|
|
#
The current attributes being shared by routes.
The current attributes being shared by routes.
|
public static
string
|
$bundle
|
|
#
The "handles" clause for the bundle currently being routed.
The "handles" clause for the bundle currently being routed.
|
public static
integer
|
$segments
|
5 |
#
The number of URI segments allowed as method arguments.
The number of URI segments allowed as method arguments.
|
public static
array
|
$patterns
|
array(
'(:num)' => '([0-9]+)',
'(:any)' => '([a-zA-Z0-9\.\-_%=]+)',
'(:segment)' => '([^/]+)',
'(:all)' => '(.*)',
) |
#
The wildcard patterns supported by the router.
The wildcard patterns supported by the router.
|
public static
array
|
$optional
|
array(
'/(:num?)' => '(?:/([0-9]+)',
'/(:any?)' => '(?:/([a-zA-Z0-9\.\-_%=]+)',
'/(:segment?)' => '(?:/([^/]+)',
'/(:all?)' => '(?:/(.*)',
) |
#
The optional wildcard patterns supported by the router.
The optional wildcard patterns supported by the router.
|
public static
array
|
$methods
|
array('GET', 'POST', 'PUT', 'DELETE', 'HEAD', 'OPTIONS') |
#
An array of HTTP request methods.
An array of HTTP request methods.
|