Méthode |
Description |
|
accepts ( string | array $contentTypes ) : boolean |
Determines whether the current requests accepts a given content type. |
|
acceptsHtml ( ) : boolean |
Determines whether a request accepts HTML. |
|
acceptsJson ( ) : boolean |
Determines whether a request accepts JSON. |
|
ajax ( ) : boolean |
Determine if the request is the result of an AJAX call. |
|
all ( ) : array |
Get all of the input and files for the request. |
|
allFiles ( ) : array |
Get an array of all of the files on the request. |
|
bearerToken ( ) : string | null |
Get the bearer token from the request headers. |
|
capture ( ) : static |
Create a new Illuminate HTTP request from server variables. |
|
cookie ( string $key = null, string | array | null $default = null ) : string | array |
Retrieve a cookie from the request. |
|
create ( string $uri, string $method = 'GET', array $parameters = [], array $cookies = [], array $files = [], array $server = [], string $content = null ) : Request |
Creates a Request based on a given URI and configuration. |
|
createFromBase ( Request $request ) : Illuminate\Http\Request |
Create an Illuminate request from a Symfony instance. |
|
createFromGlobals ( ) : Request |
Creates a new request with values from PHP's super globals. |
|
decodedPath ( ) : string |
Get the current encoded path info for the request. |
|
duplicate ( array $query = null, array $request = null, array $attributes = null, array $cookies = null, array $files = null, array $server = null ) : Request |
Clones a request and overrides some of its parameters. |
|
enableHttpMethodParameterOverride ( ) |
Enables support for the _method request parameter to determine the intended HTTP method. |
|
except ( array | mixed $keys ) : array |
Get all of the input except for a specified array of items. |
|
exists ( string | array $key ) : boolean |
Determine if the request contains a given input item key. |
|
file ( string $key = null, mixed $default = null ) : Illuminate\Http\UploadedFile | array | null |
Retrieve a file from the request. |
|
fingerprint ( ) : string |
Get a unique fingerprint for the request / route / IP address. |
|
flash ( string $filter = null, array $keys = [] ) : void |
Flash the input for the current request to the session. |
|
flashExcept ( array | mixed $keys ) : void |
Flash only some of the input to the session. |
|
flashOnly ( array | mixed $keys ) : void |
Flash only some of the input to the session. |
|
flush ( ) : void |
Flush all of the old input from the session. |
|
format ( string $default = 'html' ) : string |
Get the data format expected in the response. |
|
fullUrl ( ) : string |
Get the full URL for the request. |
|
fullUrlIs ( ) : boolean |
Determine if the current request URL and query string matches a pattern. |
|
fullUrlWithQuery ( array $query ) : string |
Get the full URL for the request with the added query string parameters. |
|
get ( string $key, mixed $default = null ) : mixed |
Gets a "parameter" value from any bag. |
|
getAcceptableContentTypes ( ) : array |
Gets a list of content types acceptable by the client browser. |
|
getBasePath ( ) : string |
Returns the root path from which this request is executed. |
|
getBaseUrl ( ) : string |
Returns the root URL from which this request is executed. |
|
getCharsets ( ) : array |
Gets a list of charsets acceptable by the client browser. |
|
getClientIp ( ) : string |
Returns the client IP address. |
|
getClientIps ( ) : array |
Returns the client IP addresses. |
|
getContent ( boolean $asResource = false ) : string | resource |
Returns the request body content. |
|
getContentType ( ) : string | null |
Gets the format associated with the request. |
|
getDefaultLocale ( ) : string |
Get the default locale. |
|
getETags ( ) : array |
Gets the Etags. |
|
getEncodings ( ) : array |
Gets a list of encodings acceptable by the client browser. |
|
getFormat ( string $mimeType ) : string | null |
Gets the format associated with the mime type. |
|
getHost ( ) : string |
Returns the host name. |
|
getHttpHost ( ) : string |
Returns the HTTP host being requested. |
|
getHttpMethodParameterOverride ( ) : boolean |
Checks whether support for the _method request parameter is enabled. |
|
getLanguages ( ) : array |
Gets a list of languages acceptable by the client browser. |
|
getLocale ( ) : string |
Get the locale. |
|
getMethod ( ) : string |
Gets the request "intended" method. |
|
getMimeType ( string $format ) : string |
Gets the mime type associated with the format. |
|
getPassword ( ) : string | null |
Returns the password. |
|
getPathInfo ( ) : string |
Returns the path being requested relative to the executed script. |
|
getPort ( ) : string |
Returns the port on which the request is made. |
|
getPreferredLanguage ( array $locales = null ) : string | null |
Returns the preferred language. |
|
getQueryString ( ) : string | null |
Generates the normalized query string for the Request. |
|
getRealMethod ( ) : string |
Gets the "real" request method. |
|
getRelativeUriForPath ( string $path ) : string |
Returns the path as relative reference from the current Request path. |
|
getRequestFormat ( string $default = 'html' ) : string |
Gets the request format. |
|
getRequestUri ( ) : string |
Returns the requested URI (path and query string). |
|
getRouteResolver ( ) : Closure |
Get the route resolver callback. |
|
getScheme ( ) : string |
Gets the request's scheme. |
|
getSchemeAndHttpHost ( ) : string |
Gets the scheme and HTTP host. |
|
getScriptName ( ) : string |
Returns current script name. |
|
getSession ( ) : Symfony\Component\HttpFoundation\SessionInterface | null |
Gets the Session. |
|
getTrustedHeaderName ( string $key ) : string |
Gets the trusted proxy header name. |
|
getTrustedHosts ( ) : array |
Gets the list of trusted host patterns. |
|
getTrustedProxies ( ) : array |
Gets the list of trusted proxies. |
|
getUri ( ) : string |
Generates a normalized URI (URL) for the Request. |
|
getUriForPath ( string $path ) : string |
Generates a normalized URI for the given path. |
|
getUser ( ) : string | null |
Returns the user. |
|
getUserInfo ( ) : string |
Gets the user info. |
|
getUserResolver ( ) : Closure |
Get the user resolver callback. |
|
has ( string | array $key ) : boolean |
Determine if the request contains a non-empty value for an input item. |
|
hasCookie ( string $key ) : boolean |
Determine if a cookie is set on the request. |
|
hasFile ( string $key ) : boolean |
Determine if the uploaded data contains a file. |
|
hasHeader ( string $key ) : boolean |
Determine if a header is set on the request. |
|
hasMacro ( string $name ) : boolean |
Checks if macro is registered. |
|
hasPreviousSession ( ) : boolean |
Whether the request contains a Session which was started in one of the
previous requests. |
|
hasSession ( ) : boolean |
Whether the request contains a Session object. |
|
header ( string $key = null, string | array | null $default = null ) : string | array |
Retrieve a header from the request. |
|
initialize ( array $query = [], array $request = [], array $attributes = [], array $cookies = [], array $files = [], array $server = [], string | resource $content = null ) |
Sets the parameters for this request. |
|
input ( string $key = null, string | array | null $default = null ) : string | array |
Retrieve an input item from the request. |
|
instance ( ) |
Return the Request instance. |
|
intersect ( array | mixed $keys ) : array |
Intersect an array of items with the input data. |
|
ip ( ) : string |
Returns the client IP address. |
|
ips ( ) : array |
Returns the client IP addresses. |
|
is ( ) : boolean |
Determine if the current request URI matches a pattern. |
|
isJson ( ) : boolean |
Determine if the request is sending JSON. |
|
isMethod ( string $method ) : boolean |
Checks if the request method is of specified type. |
|
isMethodSafe ( ) : boolean |
Checks whether the method is safe or not. |
|
isNoCache ( ) : boolean |
|
|
isSecure ( ) : boolean |
Checks whether the request is secure or not. |
|
isXmlHttpRequest ( ) : boolean |
Returns true if the request is a XMLHttpRequest. |
|
json ( string $key = null, mixed $default = null ) : mixed |
Get the JSON payload for the request. |
|
macro ( string $name, callable $macro ) : void |
Register a custom macro. |
|
matchesType ( string $actual, string $type ) : boolean |
Determine if the given content types match. |
|
merge ( array $input ) : void |
Merge new input into the current request's input array. |
|
method ( ) : string |
Get the request method. |
|
normalizeQueryString ( string $qs ) : string |
Normalizes a query string. |
|
offsetExists ( string $offset ) : boolean |
Determine if the given offset exists. |
|
offsetGet ( string $offset ) : mixed |
Get the value at the given offset. |
|
offsetSet ( string $offset, mixed $value ) : void |
Set the value at the given offset. |
|
offsetUnset ( string $offset ) : void |
Remove the value at the given offset. |
|
old ( string $key = null, string | array | null $default = null ) : string | array |
Retrieve an old input item. |
|
only ( array | mixed $keys ) : array |
Get a subset of the items from the input data. |
|
overrideGlobals ( ) |
Overrides the PHP global variables according to this request instance. |
|
path ( ) : string |
Get the current path info for the request. |
|
pjax ( ) : boolean |
Determine if the request is the result of an PJAX call. |
|
prefers ( string | array $contentTypes ) : string | null |
Return the most suitable content type from the given array based on content negotiation. |
|
query ( string $key = null, string | array | null $default = null ) : string | array |
Retrieve a query string item from the request. |
|
replace ( array $input ) : void |
Replace the input for the current request. |
|
root ( ) : string |
Get the root URL for the application. |
|
route ( string | null $param = null ) : Illuminate\Routing\Route | object | string |
Get the route handling the request. |
|
secure ( ) : boolean |
Determine if the request is over HTTPS. |
|
segment ( integer $index, string | null $default = null ) : string | null |
Get a segment from the URI (1 based index). |
|
segments ( ) : array |
Get all of the segments for the request path. |
|
server ( string $key = null, string | array | null $default = null ) : string | array |
Retrieve a server variable from the request. |
|
session ( ) : Illuminate\Session\Store |
Get the session associated with the request. |
|
setDefaultLocale ( string $locale ) |
Sets the default locale. |
|
setFactory ( callable | null $callable ) |
Sets a callable able to create a Request instance. |
|
setFormat ( string $format, string | array $mimeTypes ) |
Associates a format with mime types. |
|
setLocale ( string $locale ) |
Sets the locale. |
|
setMethod ( string $method ) |
Sets the request method. |
|
setRequestFormat ( string $format ) |
Sets the request format. |
|
setRouteResolver ( Closure $callback ) |
Set the route resolver callback. |
|
setSession ( Symfony\Component\HttpFoundation\SessionInterface $session ) |
Sets the Session. |
|
setTrustedHeaderName ( string $key, string $value ) |
Sets the name for trusted headers. |
|
setTrustedHosts ( array $hostPatterns ) |
Sets a list of trusted host patterns. |
|
setTrustedProxies ( array $proxies ) |
Sets a list of trusted proxies. |
|
setUserResolver ( Closure $callback ) |
Set the user resolver callback. |
|
toArray ( ) : array |
Get all of the input and files for the request. |
|
url ( ) : string |
Get the URL (no query string) for the request. |
|
user ( string | null $guard = null ) : mixed |
Get the user making the request. |
|
wantsJson ( ) : boolean |
Determine if the current request is asking for JSON in return. |
|