Methods summary
public
|
#
__construct( string $method, string $uri, array $action, array $parameters = array() )
Create a new Route instance.
Create a new Route instance.
Parameters
- $method
string $method
- $uri
string $uri
- $action
array $action
- $parameters
array $parameters
|
protected
|
#
parameters( array $action, array $parameters )
Set the parameters array to the correct value.
Set the parameters array to the correct value.
Parameters
- $action
array $action
- $parameters
array $parameters
|
public
Laravel\Response
|
#
call( )
Call a given route and return the route's response.
Call a given route and return the route's response.
Returns
|
public
mixed
|
#
response( )
Execute the route action and return the response.
Execute the route action and return the response.
Unlike the "call" method, none of the attached filters will be run.
Returns
mixed
|
protected
array
|
#
filters( string $event )
Get the filters that are attached to the route for a given event.
Get the filters that are attached to the route for a given event.
Parameters
Returns
array
|
protected
array
|
#
patterns( )
Get the pattern filters for the route.
Get the pattern filters for the route.
Returns
array
|
protected
string
|
#
delegate( )
Get the controller action delegate assigned to the route.
Get the controller action delegate assigned to the route.
If no delegate is assigned, null will be returned by the method.
Returns
string
|
protected
Closure
|
#
handler( )
Get the anonymous function assigned to handle the route.
Get the anonymous function assigned to handle the route.
Returns
|
public
boolean
|
#
is( string $name )
Determine if the route has a given name.
Determine if the route has a given name.
$login = Request::route()->is('login');
Parameters
Returns
boolean
|
public static
|
#
controller( string|array $controllers, string|array $defaults = 'index' )
Register a controller with the router.
Register a controller with the router.
Parameters
- $controllers
string|array $controllers
- $defaults
string|array $defaults
|
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
|
#
get( string|array $route, mixed $action )
Register a GET route with the router.
Register a GET route with the router.
Parameters
- $route
string|array $route
- $action
mixed $action
|
public static
|
#
post( string|array $route, mixed $action )
Register a POST route with the router.
Register a POST route with the router.
Parameters
- $route
string|array $route
- $action
mixed $action
|
public static
|
#
put( string|array $route, mixed $action )
Register a PUT route with the router.
Register a PUT route with the router.
Parameters
- $route
string|array $route
- $action
mixed $action
|
public static
|
#
patch( string|array $route, mixed $action )
Register a PATCH route with the router.
Register a PATCH route with the router.
Parameters
- $route
string|array $route
- $action
mixed $action
|
public static
|
#
delete( string|array $route, mixed $action )
Register a DELETE route with the router.
Register a DELETE route with the router.
Parameters
- $route
string|array $route
- $action
mixed $action
|
public static
|
#
any( string|array $route, mixed $action )
Register a route that handles any request method.
Register a route that handles any request method.
Parameters
- $route
string|array $route
- $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
|
#
share( array $routes, mixed $action )
Register many request URIs to a single action.
Register many request URIs to a single action.
Parameters
- $routes
array $routes
- $action
mixed $action
|
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
|
#
filter( string $name, mixed $callback )
Register a route filter.
Parameters
- $name
string $name
- $callback
mixed $callback
|
public static
Laravel\Response
|
#
forward( string $method, string $uri )
Calls the specified route and returns its response.
Calls the specified route and returns its response.
Parameters
- $method
string $method
- $uri
string $uri
Returns
|