Свойство | Тип | Описание | |
---|---|---|---|
$cachedRoot | string | null | A cached copy of the URL root for the current request. | |
$cachedSchema | string | null | A cached copy of the URL schema for the current request. | |
$dontEncode | array | Characters that should not be URL encoded. | |
$forceSchema | string | The forced schema for URLs. | |
$forcedRoot | string | The forced URL root. | |
$formatHostUsing | Closure | The callback to use to format hosts. | |
$formatPathUsing | Closure | The callback to use to format paths. | |
$request | Illuminate\Http\Request | The request instance. | |
$rootNamespace | string | The root namespace being applied to controller actions. | |
$routes | Illuminate\Routing\RouteCollection | The route collection. | |
$sessionResolver | callable | The session resolver callable. |
Метод | Описание | |
---|---|---|
__construct ( RouteCollection $routes, Illuminate\Http\Request $request ) : void | Create a new URL Generator instance. | |
action ( string $action, mixed $parameters = [], boolean $absolute = true ) : string | Get the URL to a controller action. | |
asset ( string $path, boolean | null $secure = null ) : string | Generate the URL to an application asset. | |
assetFrom ( string $root, string $path, boolean | null $secure = null ) : string | Generate the URL to an asset from a custom root domain such as CDN, etc. | |
current ( ) : string | Get the current URL for the request. | |
forceRootUrl ( string $root ) : void | Set the forced root URL. | |
forceSchema ( string $schema ) : void | Force the schema for URLs. | |
formatHostUsing ( Closur\Closure $callback ) | Set a callback to be used to format the host of generated URLs. | |
formatPathUsing ( Closur\Closure $callback ) | Set a callback to be used to format the path of generated URLs. | |
full ( ) : string | Get the full URL for the current request. | |
getRequest ( ) : Illuminate\Http\Request | Get the request instance. | |
isValidUrl ( string $path ) : boolean | Determine if the given path is a valid URL. | |
pathFormatter ( ) : Closure | Get the path formatter being used by the URL generator. | |
previous ( mixed $fallback = false ) : string | Get the URL for the previous request. | |
route ( string $name, mixed $parameters = [], boolean $absolute = true ) : string | Get the URL to a named route. | |
secure ( string $path, array $parameters = [] ) : string | Generate a secure, absolute URL to the given path. | |
secureAsset ( string $path ) : string | Generate the URL to a secure asset. | |
setRequest ( Illuminate\Http\Request $request ) : void | Set the current request instance. | |
setRootControllerNamespace ( string $rootNamespace ) | Set the root controller namespace. | |
setRoutes ( RouteCollection $routes ) | Set the route collection. | |
setSessionResolver ( callable $sessionResolver ) | Set the session resolver for the generator. | |
to ( string $path, mixed $extra = [], boolean | null $secure = null ) : string | Generate an absolute URL to the given path. |
Метод | Описание | |
---|---|---|
addPortToDomain ( string $domain ) : string | Add the port to the domain if necessary. | |
addQueryString ( string $uri, array $parameters ) : mixed | string | Add a query string to the URI. | |
buildCompleteUrl ( string $root, string $path, string $tail = '' ) : string | Format the given URL segments into a single URL. | |
formatDomain ( Illuminate\Routing\Route $route, array &$parameters ) : string | Format the domain and port for the route and request. | |
formatParameters ( mixed | array $parameters ) : array | Format the array of URL parameters. | |
getDomainAndScheme ( Illuminate\Routing\Route $route ) : string | Get the domain and scheme for the route. | |
getNumericParameters ( array $parameters ) : array | Get the numeric parameters from a given list. | |
getPreviousUrlFromSession ( ) : string | null | Get the previous URL from the session if possible. | |
getRootUrl ( string $scheme, string $root = null ) : string | Get the base URL for the request. | |
getRouteDomain ( Illuminate\Routing\Route $route, array &$parameters ) : string | Get the formatted domain for a given route. | |
getRouteQueryString ( array $parameters ) : string | Get the query string for a given route. | |
getRouteRoot ( Illuminate\Routing\Route $route, string $domain ) : string | Get the root of the route URL. | |
getRouteScheme ( Illuminate\Routing\Route $route ) : string | Get the scheme for the given route. | |
getScheme ( boolean | null $secure ) : string | Get the scheme for a raw URL. | |
getSession ( ) : Illuminate\Session\Store | null | Get the session implementation from the resolver. | |
getStringParameters ( array $parameters ) : array | Get the string parameters from a given list. | |
removeIndex ( string $root ) : string | Remove the index.php file from a path. | |
replaceNamedParameters ( string $path, array &$parameters ) : string | Replace all of the named parameters in the path. | |
replaceRoot ( Illuminate\Routing\Route $route, string $domain, array &$parameters ) : string | Replace the parameters on the root path. | |
replaceRoutableParameters ( array $parameters = [] ) : array | Replace UrlRoutable parameters with their route parameter. | |
replaceRouteParameters ( string $path, array &$parameters ) : string | Replace all of the wildcard parameters for a route path. | |
toRoute ( Illuminate\Routing\Route $route, mixed $parameters, boolean $absolute ) : string | Get the URL for a given route instance. |
public __construct ( RouteCollection $routes, Illuminate\Http\Request $request ) : void | ||
$routes | RouteCollection | |
$request | Illuminate\Http\Request | |
Результат | void |
protected addPortToDomain ( string $domain ) : string | ||
$domain | string | |
Результат | string |
public forceRootUrl ( string $root ) : void | ||
$root | string | |
Результат | void |
public forceSchema ( string $schema ) : void | ||
$schema | string | |
Результат | void |
protected formatDomain ( Illuminate\Routing\Route $route, array &$parameters ) : string | ||
$route | Illuminate\Routing\Route | |
$parameters | array | |
Результат | string |
public formatHostUsing ( Closur\Closure $callback ) | ||
$callback | Closur\Closure |
public formatPathUsing ( Closur\Closure $callback ) | ||
$callback | Closur\Closure |
protected getDomainAndScheme ( Illuminate\Routing\Route $route ) : string | ||
$route | Illuminate\Routing\Route | |
Результат | string |
protected getNumericParameters ( array $parameters ) : array | ||
$parameters | array | |
Результат | array |
protected getPreviousUrlFromSession ( ) : string | null | ||
Результат | string | null |
public getRequest ( ) : Illuminate\Http\Request | ||
Результат | Illuminate\Http\Request |
protected getRouteDomain ( Illuminate\Routing\Route $route, array &$parameters ) : string | ||
$route | Illuminate\Routing\Route | |
$parameters | array | |
Результат | string |
protected getRouteQueryString ( array $parameters ) : string | ||
$parameters | array | |
Результат | string |
protected getRouteRoot ( Illuminate\Routing\Route $route, string $domain ) : string | ||
$route | Illuminate\Routing\Route | |
$domain | string | |
Результат | string |
protected getRouteScheme ( Illuminate\Routing\Route $route ) : string | ||
$route | Illuminate\Routing\Route | |
Результат | string |
protected getSession ( ) : Illuminate\Session\Store | null | ||
Результат | Illuminate\Session\Store | null |
protected getStringParameters ( array $parameters ) : array | ||
$parameters | array | |
Результат | array |
public isValidUrl ( string $path ) : boolean | ||
$path | string | |
Результат | boolean |
public pathFormatter ( ) : Closure | ||
Результат | Closure |
protected removeIndex ( string $root ) : string | ||
$root | string | |
Результат | string |
protected replaceRoutableParameters ( array $parameters = [] ) : array | ||
$parameters | array | |
Результат | array |
public secureAsset ( string $path ) : string | ||
$path | string | |
Результат | string |
public setRequest ( Illuminate\Http\Request $request ) : void | ||
$request | Illuminate\Http\Request | |
Результат | void |
public setRootControllerNamespace ( string $rootNamespace ) | ||
$rootNamespace | string |
public setRoutes ( RouteCollection $routes ) | ||
$routes | RouteCollection |
public setSessionResolver ( callable $sessionResolver ) | ||
$sessionResolver | callable |
protected array $dontEncode | ||
Результат | array |
protected string $forceSchema | ||
Результат | string |
protected Closure $formatHostUsing | ||
Результат | Closure |
protected Closure $formatPathUsing | ||
Результат | Closure |
protected Request,Illuminate\Http $request | ||
Результат | Illuminate\Http\Request |
protected string $rootNamespace | ||
Результат | string |
protected RouteCollection,Illuminate\Routing $routes | ||
Результат | Illuminate\Routing\RouteCollection |
protected callable $sessionResolver | ||
Результат | callable |