interface
Illuminate
/
Contracts
/
Routing
/
UrlGenerator
You're browsing the documentation for an upcoming version of Laravel. The documentation and features of this release are subject to change.
UrlGenerator
Methods
public
current ( ) : string
Get the current URL for the request.
public
previous ( $fallback ) : string
Get the URL for the previous request.
Parameters
- $fallback mixed
public
to ( $path , $extra , $secure ) : string
Generate an absolute URL to the given path.
Parameters
- $path string
- $extra mixed
- $secure bool|null
public
secure ( $path , $parameters ) : string
Generate a secure, absolute URL to the given path.
Parameters
- $path string
- $parameters array
public
asset ( $path , $secure ) : string
Generate the URL to an application asset.
Parameters
- $path string
- $secure bool|null
public
route ( $name , $parameters , $absolute ) : string
Get the URL to a named route.
Parameters
- $name string
- $parameters mixed
- $absolute bool
public
signedRoute ( $name , $parameters , $expiration , $absolute ) : string
Create a signed route URL for a named route.
Parameters
- $name string
- $parameters mixed
- $expiration DateTimeInterface |DateInterval |int|null
- $absolute bool
public
temporarySignedRoute ( $name , $expiration , $parameters , $absolute ) : string
Create a temporary signed route URL for a named route.
Parameters
- $name string
- $expiration DateTimeInterface |DateInterval |int
- $parameters array
- $absolute bool
public
action ( $action , $parameters , $absolute ) : string
Get the URL to a controller action.
Parameters
- $action string|array
- $parameters mixed
- $absolute bool
public
getRootControllerNamespace ( ) : string
Get the root controller namespace.
public
setRootControllerNamespace ( $rootNamespace ) : $this
Set the root controller namespace.
Parameters
- $rootNamespace string