| Methods | 
	
			| 
					
	public
					
					
				 | __construct(Dispatcher $events, Container|null $container = null)
		Create a new Router instance.
	 
	Create a new Router instance. | # | 
	
			| 
					
	public
					
					
				 | get(string $uri, array|string|callable|null $action = null): Route
		Register a new GET route with the router.
	 
	Register a new GET route with the router.Implements | # | 
	
			| 
					
	public
					
					
				 | post(string $uri, array|string|callable|null $action = null): Route
		Register a new POST route with the router.
	 
	Register a new POST route with the router.Implements | # | 
	
			| 
					
	public
					
					
				 | put(string $uri, array|string|callable|null $action = null): Route
		Register a new PUT route with the router.
	 
	Register a new PUT route with the router.Implements | # | 
	
			| 
					
	public
					
					
				 | patch(string $uri, array|string|callable|null $action = null): Route
		Register a new PATCH route with the router.
	 
	Register a new PATCH route with the router.Implements | # | 
	
			| 
					
	public
					
					
				 | delete(string $uri, array|string|callable|null $action = null): Route
		Register a new DELETE route with the router.
	 
	Register a new DELETE route with the router.Implements | # | 
	
			| 
					
	public
					
					
				 | options(string $uri, array|string|callable|null $action = null): Route
		Register a new OPTIONS route with the router.
	 
	Register a new OPTIONS route with the router.Implements | # | 
	
			| 
					
	public
					
					
				 | any(string $uri, array|string|callable|null $action = null): Route
		Register a new route responding to all verbs.
	 
	Register a new route responding to all verbs. | # | 
	
			| 
					
	public
					
					
				 | fallback(array|string|callable|null $action): Route
		Register a new fallback route with the router.
	 
	Register a new fallback route with the router. | # | 
	
			| 
					
	public
					
					
				 | redirect(string $uri, string $destination, int $status = 302): Route
		Create a redirect from one URI to another.
	 
	Create a redirect from one URI to another. | # | 
	
			| 
					
	public
					
					
				 | permanentRedirect(string $uri, string $destination): Route
		Create a permanent redirect from one URI to another.
	 
	Create a permanent redirect from one URI to another. | # | 
	
			| 
					
	public
					
					
				 | view(string $uri, string $view, array $data = [], int|array $status = 200, array $headers = []): Route
		Register a new route that returns a view.
	 
	Register a new route that returns a view. | # | 
	
			| 
					
	public
					
					
				 | match(array|string $methods, string $uri, array|string|callable|null $action = null): Route
		Register a new route with the given verbs.
	 
	Register a new route with the given verbs.Implements | # | 
	
			| 
					
	public
					
					
				 | resources(array $resources, array $options = []): void
		Register an array of resource controllers.
	 
	Register an array of resource controllers. | # | 
	
			| 
					
	public
					
					
				 | resource(string $name, string $controller, array $options = []): PendingResourceRegistration
		Route a resource to a controller.
	 
	Route a resource to a controller.Implements | # | 
	
			| 
					
	public
					
					
				 | apiResources(array $resources, array $options = []): void
		Register an array of API resource controllers.
	 
	Register an array of API resource controllers. | # | 
	
			| 
					
	public
					
					
				 | apiResource(string $name, string $controller, array $options = []): PendingResourceRegistration
		Route an API resource to a controller.
	 
	Route an API resource to a controller. | # | 
	
			| 
					
	public
					
					
				 | singletons(array $singletons, array $options = []): void
		Register an array of singleton resource controllers.
	 
	Register an array of singleton resource controllers. | # | 
	
			| 
					
	public
					
					
				 | singleton(string $name, string $controller, array $options = []): PendingSingletonResourceRegistration
		Route a singleton resource to a controller.
	 
	Route a singleton resource to a controller. | # | 
	
			| 
					
	public
					
					
				 | apiSingletons(array $singletons, array $options = []): void
		Register an array of API singleton resource controllers.
	 
	Register an array of API singleton resource controllers. | # | 
	
			| 
					
	public
					
					
				 | apiSingleton(string $name, string $controller, array $options = []): PendingSingletonResourceRegistration
		Route an API singleton resource to a controller.
	 
	Route an API singleton resource to a controller. | # | 
	
			| 
					
	public
					
					
				 | group(array $attributes, Closure|array|string $routes): $this
		Create a route group with shared attributes.
	 
	Create a route group with shared attributes.Implements | # | 
	
			| 
					
	protected
					
					
				 | updateGroupStack(array $attributes): void
		Update the group stack with the given attributes.
	 
	Update the group stack with the given attributes. | # | 
	
			| 
					
	public
					
					
				 | mergeWithLastGroup(array $new, bool $prependExistingPrefix = true): array
		Merge the given array with the last group stack.
	 
	Merge the given array with the last group stack. | # | 
	
			| 
					
	protected
					
					
				 | loadRoutes(Closure|string $routes): void
		Load the provided routes.
	 
	Load the provided routes. | # | 
	
			| 
					
	public
					
					
				 | getLastGroupPrefix(): string
		Get the prefix from the last group on the stack.
	 
	Get the prefix from the last group on the stack. | # | 
	
			| 
					
	public
					
					
				 | addRoute(array|string $methods, string $uri, array|string|callable|null $action): Route
		Add a route to the underlying route collection.
	 
	Add a route to the underlying route collection. | # | 
	
			| 
					
	protected
					
					
				 | createRoute(array|string $methods, string $uri, mixed $action): Route
		Create a new route instance.
	 
	Create a new route instance. | # | 
	
			| 
					
	protected
					
					
				 | actionReferencesController(mixed $action): bool
		Determine if the action is routing to a controller.
	 
	Determine if the action is routing to a controller. | # | 
	
			| 
					
	protected
					
					
				 | convertToControllerAction(array|string $action): array
		Add a controller based route action to the action array.
	 
	Add a controller based route action to the action array. | # | 
	
			| 
					
	protected
					
					
				 | prependGroupNamespace(string $class): string
		Prepend the last group namespace onto the use clause.
	 
	Prepend the last group namespace onto the use clause. | # | 
	
			| 
					
	protected
					
					
				 | prependGroupController(string $class): string
		Prepend the last group controller onto the use clause.
	 
	Prepend the last group controller onto the use clause. | # | 
	
			| 
					
	public
					
					
				 | newRoute(array|string $methods, string $uri, mixed $action): Route
		Create a new Route object.
	 
	Create a new Route object. | # | 
	
			| 
					
	protected
					
					
				 | prefix(string $uri): string
		Prefix the given URI with the last prefix.
	 
	Prefix the given URI with the last prefix. | # | 
	
			| 
					
	protected
					
					
				 | addWhereClausesToRoute(Route $route): Route
		Add the necessary where clauses to the route based on its initial registration.
	 
	Add the necessary where clauses to the route based on its initial registration. | # | 
	
			| 
					
	protected
					
					
				 | mergeGroupAttributesIntoRoute(Route $route): void
		Merge the group stack with the controller action.
	 
	Merge the group stack with the controller action. | # | 
	
			| 
					
	public
					
					
				 | respondWithRoute(string $name): Response
		Return the response returned by the given route.
	 
	Return the response returned by the given route. | # | 
	
			| 
					
	public
					
					
				 | dispatch(Request $request): Response
		Dispatch the request to the application.
	 
	Dispatch the request to the application. | # | 
	
			| 
					
	public
					
					
				 | dispatchToRoute(Request $request): Response
		Dispatch the request to a route and return the response.
	 
	Dispatch the request to a route and return the response. | # | 
	
			| 
					
	protected
					
					
				 | findRoute(Request $request): Route
		Find the route matching a given request.
	 
	Find the route matching a given request. | # | 
	
			| 
					
	protected
					
					
				 | runRoute(Request $request, Route $route): Response
		Return the response for the given route.
	 
	Return the response for the given route. | # | 
	
			| 
					
	protected
					
					
				 | runRouteWithinStack(Route $route, Request $request): mixed
		Run the given route within a Stack "onion" instance.
	 
	Run the given route within a Stack "onion" instance. | # | 
	
			| 
					
	public
					
					
				 | gatherRouteMiddleware(Route $route): array
		Gather the middleware for the given route with resolved class names.
	 
	Gather the middleware for the given route with resolved class names. | # | 
	
			| 
					
	public
					
					
				 | resolveMiddleware(array $middleware, array $excluded = []): array
		Resolve a flat array of middleware classes from the provided array.
	 
	Resolve a flat array of middleware classes from the provided array. | # | 
	
			| 
					
	protected
					
					
				 | sortMiddleware(Collection $middlewares): array
		Sort the given middleware by priority.
	 
	Sort the given middleware by priority. | # | 
	
			| 
					
	public
					
					
				 | prepareResponse(Request $request, mixed $response): Response
		Create a response instance from the given value.
	 
	Create a response instance from the given value. | # | 
	
			| 
					
	public
					static
					
				 | toResponse(Request $request, mixed $response): Response
		Static version of prepareResponse.
	 
	Static version of prepareResponse. | # | 
	
			| 
					
	public
					
					
				 | substituteBindings(Route $route): Route
		Substitute the route bindings onto the route.
	 
	Substitute the route bindings onto the route.ThrowsImplements | # | 
	
			| 
					
	public
					
					
				 | substituteImplicitBindings(Route $route): void
		Substitute the implicit route bindings for the given route.
	 
	Substitute the implicit route bindings for the given route.ThrowsImplements | # | 
	
			| 
					
	public
					
					
				 | substituteImplicitBindingsUsing(callable $callback): $this
		Register a callback to run after implicit bindings are substituted.
	 
	Register a callback to run after implicit bindings are substituted. | # | 
	
			| 
					
	protected
					
					
				 | performBinding(string $key, string $value, Route $route): mixed
		Call the binding callback for the given key.
	 
	Call the binding callback for the given key.Throws | # | 
	
			| 
					
	public
					
					
				 | matched(string|callable $callback): void
		Register a route matched event listener.
	 
	Register a route matched event listener. | # | 
	
			| 
					
	public
					
					
				 | getMiddleware(): array
		Get all of the defined middleware short-hand names.
	 
	Get all of the defined middleware short-hand names. | # | 
	
			| 
					
	public
					
					
				 | aliasMiddleware(string $name, string $class): $this
		Register a short-hand name for a middleware.
	 
	Register a short-hand name for a middleware. | # | 
	
			| 
					
	public
					
					
				 | hasMiddlewareGroup(string $name): bool
		Check if a middlewareGroup with the given name exists.
	 
	Check if a middlewareGroup with the given name exists. | # | 
	
			| 
					
	public
					
					
				 | getMiddlewareGroups(): array
		Get all of the defined middleware groups.
	 
	Get all of the defined middleware groups. | # | 
	
			| 
					
	public
					
					
				 | middlewareGroup(string $name, array $middleware): $this
		Register a group of middleware.
	 
	Register a group of middleware. | # | 
	
			| 
					
	public
					
					
				 | prependMiddlewareToGroup(string $group, string $middleware): $this
		Add a middleware to the beginning of a middleware group.
	 
	Add a middleware to the beginning of a middleware group. If the middleware is already in the group, it will not be added again. | # | 
	
			| 
					
	public
					
					
				 | pushMiddlewareToGroup(string $group, string $middleware): $this
		Add a middleware to the end of a middleware group.
	 
	Add a middleware to the end of a middleware group. If the middleware is already in the group, it will not be added again. | # | 
	
			| 
					
	public
					
					
				 | removeMiddlewareFromGroup(string $group, string $middleware): $this
		Remove the given middleware from the specified group.
	 
	Remove the given middleware from the specified group. | # | 
	
			| 
					
	public
					
					
				 | flushMiddlewareGroups(): $this
		Flush the router's middleware groups.
	 
	Flush the router's middleware groups. | # | 
	
			| 
					
	public
					
					
				 | bind(string $key, string|callable $binder): void
		Add a new route parameter binder.
	 
	Add a new route parameter binder.Implements | # | 
	
			| 
					
	public
					
					
				 | model(string $key, string $class, Closure|null $callback = null): void
		Register a model binder for a wildcard.
	 
	Register a model binder for a wildcard. | # | 
	
			| 
					
	public
					
					
				 | getBindingCallback(string $key): Closure|null
		Get the binding callback for a given binding.
	 
	Get the binding callback for a given binding.Implements | # | 
	
			| 
					
	public
					
					
				 | getPatterns(): array
		Get the global "where" patterns.
	 
	Get the global "where" patterns. | # | 
	
			| 
					
	public
					
					
				 | pattern(string $key, string $pattern): void
		Set a global where pattern on all routes.
	 
	Set a global where pattern on all routes. | # | 
	
			| 
					
	public
					
					
				 | patterns(array $patterns): void
		Set a group of global where patterns on all routes.
	 
	Set a group of global where patterns on all routes. | # | 
	
			| 
					
	public
					
					
				 | hasGroupStack(): bool
		Determine if the router currently has a group stack.
	 
	Determine if the router currently has a group stack. | # | 
	
			| 
					
	public
					
					
				 | getGroupStack(): array
		Get the current group stack for the router.
	 
	Get the current group stack for the router. | # | 
	
			| 
					
	public
					
					
				 | input(string $key, string|null $default = null): mixed
		Get a route parameter for the current route.
	 
	Get a route parameter for the current route. | # | 
	
			| 
					
	public
					
					
				 | getCurrentRequest(): Request
		Get the request currently being dispatched.
	 
	Get the request currently being dispatched. | # | 
	
			| 
					
	public
					
					
				 | getCurrentRoute(): Route|null
		Get the currently dispatched route instance.
	 
	Get the currently dispatched route instance. | # | 
	
			| 
					
	public
					
					
				 | current(): Route|null
		Get the currently dispatched route instance.
	 
	Get the currently dispatched route instance. | # | 
	
			| 
					
	public
					
					
				 | has(string|array $name): bool
		Check if a route with the given name exists.
	 
	Check if a route with the given name exists. | # | 
	
			| 
					
	public
					
					
				 | currentRouteName(): string|null
		Get the current route name.
	 
	Get the current route name. | # | 
	
			| 
					
	public
					
					
				 | is(mixed ...$patterns): bool
		Alias for the "currentRouteNamed" method.
	 
	Alias for the "currentRouteNamed" method. | # | 
	
			| 
					
	public
					
					
				 | currentRouteNamed(mixed ...$patterns): bool
		Determine if the current route matches a pattern.
	 
	Determine if the current route matches a pattern. | # | 
	
			| 
					
	public
					
					
				 | currentRouteAction(): string|null
		Get the current route action.
	 
	Get the current route action. | # | 
	
			| 
					
	public
					
					
				 | uses(array|string ...$patterns): bool
		Alias for the "currentRouteUses" method.
	 
	Alias for the "currentRouteUses" method. | # | 
	
			| 
					
	public
					
					
				 | currentRouteUses(string $action): bool
		Determine if the current route action matches a given action.
	 
	Determine if the current route action matches a given action. | # | 
	
			| 
					
	public
					
					
				 | singularResourceParameters(bool $singular = true): void
		Set the unmapped global resource parameters to singular.
	 
	Set the unmapped global resource parameters to singular. | # | 
	
			| 
					
	public
					
					
				 | resourceParameters(array $parameters = []): void
		Set the global resource parameter mapping.
	 
	Set the global resource parameter mapping. | # | 
	
			| 
					
	public
					
					
				 | resourceVerbs(array $verbs = []): array|null
		Get or set the verbs used in the resource URIs.
	 
	Get or set the verbs used in the resource URIs. | # | 
	
			| 
					
	public
					
					
				 | getRoutes(): RouteCollectionInterface
		Get the underlying route collection.
	 
	Get the underlying route collection. | # | 
	
			| 
					
	public
					
					
				 | setRoutes(RouteCollection $routes): void
		Set the route collection instance.
	 
	Set the route collection instance. | # | 
	
			| 
					
	public
					
					
				 | setCompiledRoutes(array $routes): void
		Set the compiled route collection instance.
	 
	Set the compiled route collection instance. | # | 
	
			| 
					
	public
					static
					
				 | uniqueMiddleware(array $middleware): array
		Remove any duplicate middleware from the given array.
	 
	Remove any duplicate middleware from the given array. | # | 
	
			| 
					
	public
					
					
				 | setContainer(Container $container): $this
		Set the container instance used by the router.
	 
	Set the container instance used by the router. | # | 
	
			| 
					
	public
					
					
				 | __call(string $method, array $parameters): mixed
		Dynamically handle calls into the router instance.
	 
	Dynamically handle calls into the router instance. | # |