class Illuminate / Routing / RouteUrlGenerator
You're browsing the documentation for an upcoming version of Laravel. The documentation and features of this release are subject to change.

RouteUrlGenerator

Properties

protected

$url UrlGenerator

The URL generator instance.

Default: null
protected

$request Request

The request instance.

Default: null
public

$defaultParameters array

The named parameter defaults.

Default: []
public

$dontEncode array

Characters that should not be URL encoded.

Default: array

Methods

public

__construct ( $url , $request ) : void

Create a new Route URL generator.

Parameters

public

to ( $route , $parameters , $absolute ) : string

Generate a URL for the given route.

Parameters

  • $route Route
  • $parameters array
  • $absolute bool
protected

getRouteDomain ( $route , $parameters ) : string

Get the formatted domain for a given route.

Parameters

  • $route Route
  • $parameters array
protected

formatDomain ( $route , $parameters ) : string

Format the domain and port for the route and request.

Parameters

  • $route Route
  • $parameters array
protected

getRouteScheme ( $route ) : string

Get the scheme for the given route.

Parameters

protected

addPortToDomain ( $domain ) : string

Add the port to the domain if necessary.

Parameters

  • $domain string
protected

replaceRootParameters ( $route , $domain , $parameters ) : string

Replace the parameters on the root path.

Parameters

  • $route Route
  • $domain string
  • $parameters array
protected

replaceRouteParameters ( $path , array $parameters ) : string

Replace all of the wildcard parameters for a route path.

Parameters

  • $path string
  • $parameters array
protected

replaceNamedParameters ( $path , $parameters ) : string

Replace all of the named parameters in the path.

Parameters

  • $path string
  • $parameters array
protected

addQueryString ( $uri , array $parameters ) : mixed|string

Add a query string to the URI.

Parameters

  • $uri string
  • $parameters array
protected

getRouteQueryString ( array $parameters ) : string

Get the query string for a given route.

Parameters

  • $parameters array
protected

getStringParameters ( array $parameters ) : array

Get the string parameters from a given list.

Parameters

  • $parameters array
protected

getNumericParameters ( array $parameters ) : array

Get the numeric parameters from a given list.

Parameters

  • $parameters array
public

defaults ( array $defaults ) : void

Set the default named parameters used by the URL generator.

Parameters

  • $defaults array