class RouteUrlGenerator (View source)
protected UrlGenerator | $url | The URL generator instance. | |
protected Request | $request | The request instance. | |
array | $defaultParameters | The named parameter defaults. | |
array | $dontEncode | Characters that should not be URL encoded. |
void | __construct(UrlGenerator $url, Request $request) Create a new Route URL generator. | |
string | to(Route $route, array $parameters = [], bool $absolute = false) Generate a URL for the given route. | |
string | getRouteDomain(Route $route, array $parameters) Get the formatted domain for a given route. | |
string | formatDomain(Route $route, array $parameters) Format the domain and port for the route and request. | |
string | getRouteScheme(Route $route) Get the scheme for the given route. | |
string | addPortToDomain(string $domain) Add the port to the domain if necessary. | |
string | replaceRootParameters(Route $route, string $domain, array $parameters) Replace the parameters on the root path. | |
string | replaceRouteParameters(string $path, array $parameters) Replace all of the wildcard parameters for a route path. | |
string | replaceNamedParameters(string $path, array $parameters) Replace all of the named parameters in the path. | |
mixed|string | addQueryString(string $uri, array $parameters) Add a query string to the URI. | |
string | getRouteQueryString(array $parameters) Get the query string for a given route. | |
array | getStringParameters(array $parameters) Get the string parameters from a given list. | |
array | getNumericParameters(array $parameters) Get the numeric parameters from a given list. | |
void | defaults(array $defaults) Set the default named parameters used by the URL generator. |
Create a new Route URL generator.
Generate a URL for the given route.
Get the formatted domain for a given route.
Format the domain and port for the route and request.
Get the scheme for the given route.
Add the port to the domain if necessary.
Replace the parameters on the root path.
Replace all of the wildcard parameters for a route path.
Replace all of the named parameters in the path.
Add a query string to the URI.
Get the query string for a given route.
Get the string parameters from a given list.
Get the numeric parameters from a given list.
Set the default named parameters used by the URL generator.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/8.x/Illuminate/Routing/RouteUrlGenerator.html