Property | Type | Description | |
---|---|---|---|
$middlewarePriority | array | Forces the listed middleware to always be in the given order. | |
$verbs | array | All of the verbs supported by the router. |
Property | Type | Description | |
---|---|---|---|
$binders | array | The registered route value binders. | |
$container | Illuminate\Container\Container | The IoC container instance. | |
$current | Illuminate\Routing\Route | The currently dispatched route instance. | |
$currentRequest | Illuminate\Http\Request | The request currently being dispatched. | |
$events | Illuminate\Contracts\Events\Dispatcher | The event dispatcher instance. | |
$groupStack | array | The route group attribute stack. | |
$middleware | array | All of the short-hand keys for middlewares. | |
$middlewareGroups | array | All of the middleware groups. | |
$patterns | array | The globally available parameter patterns. | |
$routes | Illuminate\Routing\RouteCollection | The route collection instance. |
Method | Description | |
---|---|---|
__construct ( Illuminate\Contracts\Events\Dispatcher $events, Illuminate\Container\Container $container = null ) : void | Create a new Router instance. | |
any ( string $uri, Closure | array | string | null $action = null ) : Illuminate\Routing\Route | Register a new route responding to all verbs. | |
auth ( ) : void | Register the typical authentication routes for an application. | |
bind ( string $key, string | callable $binder ) : void | Add a new route parameter binder. | |
createClassBinding ( string $binding ) : Closure | Create a class based binding using the IoC container. | |
current ( ) : Illuminate\Routing\Route | Get the currently dispatched route instance. | |
currentRouteAction ( ) : string | null | Get the current route action. | |
currentRouteName ( ) : string | null | Get the current route name. | |
currentRouteNamed ( string $name ) : boolean | Determine if the current route matches a given name. | |
currentRouteUses ( string $action ) : boolean | Determine if the current route action matches a given action. | |
delete ( string $uri, Closure | array | string | null $action = null ) : Illuminate\Routing\Route | Register a new DELETE route with the router. | |
dispatch ( Illuminate\Http\Request $request ) : Illuminate\Http\Response | Dispatch the request to the application. | |
dispatchToRoute ( Illuminate\Http\Request $request ) : mixed | Dispatch the request to a route and return the response. | |
gatherRouteMiddleware ( Illuminate\Routing\Route $route ) : array | Gather the middleware for the given route. | |
get ( string $uri, Closure | array | string | null $action = null ) : Illuminate\Routing\Route | Register a new GET route with the router. | |
getBindingCallback ( string $key ) : Closure | null | Get the binding callback for a given binding. | |
getCurrentRequest ( ) : Illuminate\Http\Request | Get the request currently being dispatched. | |
getCurrentRoute ( ) : Illuminate\Routing\Route | Get the currently dispatched route instance. | |
getGroupStack ( ) : array | Get the current group stack for the router. | |
getLastGroupPrefix ( ) : string | Get the prefix from the last group on the stack. | |
getMiddleware ( ) : array | Get all of the defined middleware short-hand names. | |
getPatterns ( ) : array | Get the global "where" patterns. | |
getRoutes ( ) : Illuminate\Routing\RouteCollection | Get the underlying route collection. | |
group ( array $attributes, Closure $callback ) : void | Create a route group with shared attributes. | |
has ( string $name ) : boolean | Check if a route with the given name exists. | |
hasGroupStack ( ) : boolean | Determine if the router currently has a group stack. | |
input ( string $key, string $default = null ) : mixed | Get a route parameter for the current route. | |
is ( ) : boolean | Alias for the "currentRouteNamed" method. | |
match ( array | string $methods, string $uri, Closure | array | string | null $action = null ) : Illuminate\Routing\Route | Register a new route with the given verbs. | |
matched ( string | callable $callback ) : void | Register a route matched event listener. | |
mergeGroup ( array $new, array $old ) : array | Merge the given group attributes. | |
mergeWithLastGroup ( array $new ) : array | Merge the given array with the last group stack. | |
middleware ( string $name, string $class ) | Register a short-hand name for a middleware. | |
middlewareGroup ( string $name, array $middleware ) | Register a group of middleware. | |
model ( string $key, string $class, Closure $callback = null ) : void | Register a model binder for a wildcard. | |
options ( string $uri, Closure | array | string | null $action = null ) : Illuminate\Routing\Route | Register a new OPTIONS route with the router. | |
patch ( string $uri, Closure | array | string | null $action = null ) : Illuminate\Routing\Route | Register a new PATCH route with the router. | |
pattern ( string $key, string $pattern ) : void | Set a global where pattern on all routes. | |
patterns ( array $patterns ) : void | Set a group of global where patterns on all routes. | |
post ( string $uri, Closure | array | string | null $action = null ) : Illuminate\Routing\Route | Register a new POST route with the router. | |
prepareResponse ( |
Create a response instance from the given value. | |
prependMiddlewareToGroup ( string $group, string $middleware ) | Add a middleware to the beginning of a middleware group. | |
pushMiddlewareToGroup ( string $group, string $middleware ) | Add a middleware to the end of a middleware group. | |
put ( string $uri, Closure | array | string | null $action = null ) : Illuminate\Routing\Route | Register a new PUT route with the router. | |
resolveMiddlewareClassName ( string $name ) : string | array | Resolve the middleware name to a class name(s) preserving passed parameters. | |
resource ( string $name, string $controller, array $options = [] ) : void | Route a resource to a controller. | |
resourceParameters ( array $parameters = [] ) : void | Set the global resource parameter mapping. | |
resources ( array $resources ) : void | Register an array of resource controllers. | |
setRoutes ( Illuminate\Routing\RouteCollection $routes ) : void | Set the route collection instance. | |
singularResourceParameters ( boolean $singular = true ) : void | Set the unmapped global resource parameters to singular. | |
substituteBindings ( Illuminate\Routing\Route $route ) : Illuminate\Routing\Route | Substitute the route bindings onto the route. | |
substituteImplicitBindings ( Illuminate\Routing\Route $route ) : void | Substitute the implicit Eloquent model bindings for the route. | |
uses ( ) : boolean | Alias for the "currentRouteUses" method. |
Method | Description | |
---|---|---|
actionReferencesController ( array $action ) : boolean | Determine if the action is routing to a controller. | |
addRoute ( array | string $methods, string $uri, Closure | array | string | null $action ) : Illuminate\Routing\Route | Add a route to the underlying route collection. | |
addWhereClausesToRoute ( Illuminate\Routing\Route $route ) : Illuminate\Routing\Route | Add the necessary where clauses to the route based on its initial registration. | |
convertToControllerAction ( array | string $action ) : array | Add a controller based route action to the action array. | |
createRoute ( array | string $methods, string $uri, mixed $action ) : Illuminate\Routing\Route | Create a new route instance. | |
findRoute ( Illuminate\Http\Request $request ) : Illuminate\Routing\Route | Find the route matching a given request. | |
formatGroupPrefix ( array $new, array $old ) : string | null | Format the prefix for the new group attributes. | |
formatUsesPrefix ( array $new, array $old ) : string | null | Format the uses prefix for the new group attributes. | |
mergeGroupAttributesIntoRoute ( Illuminate\Routing\Route $route ) : void | Merge the group stack with the controller action. | |
newRoute ( array | string $methods, string $uri, mixed $action ) : Illuminate\Routing\Route | Create a new Route object. | |
parseMiddlewareGroup ( string $name ) : array | Parse the middleware group and format it for usage. | |
performBinding ( string $key, string $value, Illuminate\Routing\Route $route ) : mixed | Call the binding callback for the given key. | |
prefix ( string $uri ) : string | Prefix the given URI with the last prefix. | |
prependGroupUses ( string $uses ) : string | Prepend the last group uses onto the use clause. | |
runRouteWithinStack ( Illuminate\Routing\Route $route, Illuminate\Http\Request $request ) : mixed | Run the given route within a Stack "onion" instance. | |
sortMiddleware ( |
Sort the given middleware by priority. | |
updateGroupStack ( array $attributes ) : void | Update the group stack with the given attributes. |
public __construct ( Illuminate\Contracts\Events\Dispatcher $events, Illuminate\Container\Container $container = null ) : void | ||
$events | Illuminate\Contracts\Events\Dispatcher | |
$container | Illuminate\Container\Container | |
return | void |
protected actionReferencesController ( array $action ) : boolean | ||
$action | array | |
return | boolean |
protected addWhereClausesToRoute ( Illuminate\Routing\Route $route ) : Illuminate\Routing\Route | ||
$route | Illuminate\Routing\Route | |
return | Illuminate\Routing\Route |
public createClassBinding ( string $binding ) : Closure | ||
$binding | string | |
return | Closure |
public current ( ) : Illuminate\Routing\Route | ||
return | Illuminate\Routing\Route |
public currentRouteAction ( ) : string | null | ||
return | string | null |
public currentRouteName ( ) : string | null | ||
return | string | null |
public currentRouteNamed ( string $name ) : boolean | ||
$name | string | |
return | boolean |
public currentRouteUses ( string $action ) : boolean | ||
$action | string | |
return | boolean |
public dispatch ( Illuminate\Http\Request $request ) : Illuminate\Http\Response | ||
$request | Illuminate\Http\Request | |
return | Illuminate\Http\Response |
public dispatchToRoute ( Illuminate\Http\Request $request ) : mixed | ||
$request | Illuminate\Http\Request | |
return | mixed |
protected findRoute ( Illuminate\Http\Request $request ) : Illuminate\Routing\Route | ||
$request | Illuminate\Http\Request | |
return | Illuminate\Routing\Route |
public gatherRouteMiddleware ( Illuminate\Routing\Route $route ) : array | ||
$route | Illuminate\Routing\Route | |
return | array |
public getCurrentRequest ( ) : Illuminate\Http\Request | ||
return | Illuminate\Http\Request |
public getCurrentRoute ( ) : Illuminate\Routing\Route | ||
return | Illuminate\Routing\Route |
public getGroupStack ( ) : array | ||
return | array |
public getLastGroupPrefix ( ) : string | ||
return | string |
public getMiddleware ( ) : array | ||
return | array |
public getPatterns ( ) : array | ||
return | array |
public getRoutes ( ) : Illuminate\Routing\RouteCollection | ||
return | Illuminate\Routing\RouteCollection |
public hasGroupStack ( ) : boolean | ||
return | boolean |
protected mergeGroupAttributesIntoRoute ( Illuminate\Routing\Route $route ) : void | ||
$route | Illuminate\Routing\Route | |
return | void |
public mergeWithLastGroup ( array $new ) : array | ||
$new | array | |
return | array |
public middleware ( string $name, string $class ) | ||
$name | string | |
$class | string |
public middlewareGroup ( string $name, array $middleware ) | ||
$name | string | |
$middleware | array |
protected parseMiddlewareGroup ( string $name ) : array | ||
$name | string | |
return | array |
public prepareResponse ( |
||
$request | ||
$response | mixed | |
return | Illuminate\Http\Response |
protected prependGroupUses ( string $uses ) : string | ||
$uses | string | |
return | string |
public prependMiddlewareToGroup ( string $group, string $middleware ) | ||
$group | string | |
$middleware | string |
public pushMiddlewareToGroup ( string $group, string $middleware ) | ||
$group | string | |
$middleware | string |
public resourceParameters ( array $parameters = [] ) : void | ||
$parameters | array | |
return | void |
protected runRouteWithinStack ( Illuminate\Routing\Route $route, Illuminate\Http\Request $request ) : mixed | ||
$route | Illuminate\Routing\Route | |
$request | Illuminate\Http\Request | |
return | mixed |
public singularResourceParameters ( boolean $singular = true ) : void | ||
$singular | boolean | |
return | void |
protected sortMiddleware ( |
||
$middlewares | ||
return | array |
public substituteBindings ( Illuminate\Routing\Route $route ) : Illuminate\Routing\Route | ||
$route | Illuminate\Routing\Route | |
return | Illuminate\Routing\Route |
public substituteImplicitBindings ( Illuminate\Routing\Route $route ) : void | ||
$route | Illuminate\Routing\Route | |
return | void |
protected updateGroupStack ( array $attributes ) : void | ||
$attributes | array | |
return | void |
protected array $binders | ||
return | array |
protected Container,Illuminate\Container $container | ||
return | Illuminate\Container\Container |
protected Route,Illuminate\Routing $current | ||
return | Illuminate\Routing\Route |
protected Request,Illuminate\Http $currentRequest | ||
return | Illuminate\Http\Request |
protected Dispatcher,Illuminate\Contracts\Events $events | ||
return | Illuminate\Contracts\Events\Dispatcher |
protected array $groupStack | ||
return | array |
protected array $middleware | ||
return | array |
protected array $middlewareGroups | ||
return | array |
public array $middlewarePriority | ||
return | array |
protected array $patterns | ||
return | array |
protected RouteCollection,Illuminate\Routing $routes | ||
return | Illuminate\Routing\RouteCollection |
public static array $verbs | ||
return | array |