UrlGenerator
class UrlGenerator implements UrlGenerator (View source)
Traits
Methods
Dynamically handle calls to the class.
Dynamically handle calls to the class.
Get the full URL for the current request.
Get the current URL for the request.
Get the URL for the previous request.
Generate an absolute URL to the given path.
Generate a secure, absolute URL to the given path.
Generate a URL to an application asset.
Generate a URL to an asset from a custom root domain such as CDN, etc.
Generate a URL to a secure asset.
Force the schema for URLs.
Get the URL to a named route.
Get the URL to a controller action.
Set the forced root URL.
Determine if the given path is a valid URL.
Get the request instance.
Set the session resolver for the generator.
Set the root controller namespace.
Details
static
mixed
__callStatic(
string $method,
array $parameters)
Dynamically handle calls to the class.
at line line 103
void
__construct(
RouteCollection $routes,
Request $request)
Create a new URL Generator instance.
at line line 152
string
to(
string $path,
mixed $extra = array(),
bool $secure = null)
Generate an absolute URL to the given path.
at line line 191
string
secure(
string $path,
array $parameters = array())
Generate a secure, absolute URL to the given path.
at line line 203
string
asset(
string $path,
bool $secure = null)
Generate a URL to an application asset.
at line line 225
string
assetFrom(
string $root,
string $path,
bool|null $secure = null)
Generate a URL to an asset from a custom root domain such as CDN, etc.
at line line 301
string
route(
string $name,
mixed $parameters = array(),
bool $absolute = true)
Get the URL to a named route.
at line line 591
string
action(
string $action,
mixed $parameters = array(),
bool $absolute = true)
Get the URL to a controller action.
at line line 735
$this
setSessionResolver(
callable $sessionResolver)
Set the session resolver for the generator.
at line line 748
$this
setRootControllerNamespace(
string $rootNamespace)
Set the root controller namespace.