class CompiledRouteCollection extends AbstractRouteCollection (View source)
protected array | $compiled | The compiled routes collection. | |
protected array | $attributes | An array of the route attributes keyed by name. | |
protected RouteCollection|null | $routes | The dynamically added routes that were added after loading the cached, compiled routes. | |
protected Router | $router | The router instance used by the route. | |
protected Container | $container | The container instance used by the route. |
Route | handleMatchedRoute(Request $request, Route|null $route) Handle the matched route. | from AbstractRouteCollection |
array | checkForAlternateVerbs(Request $request) Determine if any routes match on another HTTP verb. | from AbstractRouteCollection |
Route|null | matchAgainstRoutes(array $routes, Request $request, bool $includingMethod = true) Determine if a route in the array matches the request. | from AbstractRouteCollection |
Route | getRouteForMethods(Request $request, array $methods) Get a route (if necessary) that responds when other available methods are present. | from AbstractRouteCollection |
void | methodNotAllowed(array $others, string $method) Throw a method not allowed HTTP exception. | from AbstractRouteCollection |
array | compile() Compile the routes for caching. | from AbstractRouteCollection |
CompiledUrlMatcherDumper | dumper() Return the CompiledUrlMatcherDumper instance for the route collection. | from AbstractRouteCollection |
RouteCollection | toSymfonyRouteCollection() Convert the collection to a Symfony RouteCollection instance. | from AbstractRouteCollection |
RouteCollection | addToSymfonyRoutesCollection(RouteCollection $symfonyRoutes, Route $route) Add a route to the SymfonyRouteCollection instance. | from AbstractRouteCollection |
string | generateRouteName() Get a randomly generated route name. | from AbstractRouteCollection |
ArrayIterator | getIterator() Get an iterator for the items. | from AbstractRouteCollection |
int | count() Count the number of items in the collection. | from AbstractRouteCollection |
void | __construct(array $compiled, array $attributes) Create a new CompiledRouteCollection instance. | |
Route | add(Route $route) Add a Route instance to the collection. | |
void | refreshNameLookups() Refresh the name look-up table. | |
void | refreshActionLookups() Refresh the action look-up table. | |
Route | match(Request $request) Find the first route matching a given request. | |
Request | requestWithoutTrailingSlash(Request $request) Get a cloned instance of the given request without any trailing slash on the URI. | |
Route[] | get(string|null $method = null) Get routes from the collection by method. | |
bool | hasNamedRoute(string $name) Determine if the route collection contains a given named route. | |
Route|null | getByName(string $name) Get a route instance by its name. | |
Route|null | getByAction(string $action) Get a route instance by its controller action. | |
Route[] | getRoutes() Get all of the routes in the collection. | |
array | getRoutesByMethod() Get all of the routes keyed by their HTTP verb / method. | |
Route[] | getRoutesByName() Get all of the routes keyed by their name. | |
Route | newRoute(array $attributes) Resolve an array of attributes to a Route instance. | |
$this | setRouter(Router $router) Set the router instance on the route. | |
$this | setContainer(Container $container) Set the container instance on the route. |
Determine if any routes match on another HTTP verb.
Determine if a route in the array matches the request.
Get a route (if necessary) that responds when other available methods are present.
Throw a method not allowed HTTP exception.
Compile the routes for caching.
Return the CompiledUrlMatcherDumper instance for the route collection.
Convert the collection to a Symfony RouteCollection instance.
Add a route to the SymfonyRouteCollection instance.
Get a randomly generated route name.
Get an iterator for the items.
Count the number of items in the collection.
Create a new CompiledRouteCollection instance.
Refresh the name look-up table.
This is done in case any names are fluently defined or if routes are overwritten.
Refresh the action look-up table.
This is done in case any actions are overwritten with new controllers.
Get a cloned instance of the given request without any trailing slash on the URI.
Get routes from the collection by method.
Determine if the route collection contains a given named route.
Get a route instance by its name.
Get a route instance by its controller action.
Get all of the routes in the collection.
Get all of the routes keyed by their HTTP verb / method.
Get all of the routes keyed by their name.
Resolve an array of attributes to a Route instance.
Set the router instance on the route.
Set the container instance on the route.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/8.x/Illuminate/Routing/CompiledRouteCollection.html