On this page
AbstractRouteCollection
abstract class AbstractRouteCollection implements Countable, IteratorAggregate, RouteCollectionInterface (View source)
Methods
Route | handleMatchedRoute(Request $request, Route|null $route) Handle the matched route. |
|
array | checkForAlternateVerbs(Request $request) Determine if any routes match on another HTTP verb. |
|
Route|null | matchAgainstRoutes(array $routes, Request $request, bool $includingMethod = true) Determine if a route in the array matches the request. |
|
Route | getRouteForMethods(Request $request, array $methods) Get a route (if necessary) that responds when other available methods are present. |
|
void | requestMethodNotAllowed(Request $request, array $others, string $method) Throw a method not allowed HTTP exception. |
|
void | methodNotAllowed(array $others, string $method) deprecated Throw a method not allowed HTTP exception. |
|
array | compile() Compile the routes for caching. |
|
CompiledUrlMatcherDumper | dumper() Return the CompiledUrlMatcherDumper instance for the route collection. |
|
RouteCollection | toSymfonyRouteCollection() Convert the collection to a Symfony RouteCollection instance. |
|
RouteCollection | addToSymfonyRoutesCollection(RouteCollection $symfonyRoutes, Route $route) Add a route to the SymfonyRouteCollection instance. |
|
string | generateRouteName() Get a randomly generated route name. |
|
Traversable | getIterator() Get an iterator for the items. |
|
int | count() Count the number of items in the collection. |
Details
protected array checkForAlternateVerbs(Request $request)
Determine if any routes match on another HTTP verb.
protected Route|null matchAgainstRoutes(array $routes, Request $request, bool $includingMethod = true)
Determine if a route in the array matches the request.
protected Route getRouteForMethods(Request $request, array $methods)
Get a route (if necessary) that responds when other available methods are present.
protected void requestMethodNotAllowed(Request $request, array $others, string $method)
Throw a method not allowed HTTP exception.
protected void methodNotAllowed(array $others, string $method) deprecated
deprecated
use requestMethodNotAllowedThrow a method not allowed HTTP exception.
array compile()
Compile the routes for caching.
CompiledUrlMatcherDumper dumper()
Return the CompiledUrlMatcherDumper instance for the route collection.
RouteCollection toSymfonyRouteCollection()
Convert the collection to a Symfony RouteCollection instance.
protected RouteCollection addToSymfonyRoutesCollection(RouteCollection $symfonyRoutes, Route $route)
Add a route to the SymfonyRouteCollection instance.
protected string generateRouteName()
Get a randomly generated route name.
Traversable getIterator()
Get an iterator for the items.
int count()
Count the number of items in the collection.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/10.x/Illuminate/Routing/AbstractRouteCollection.html