Request
Extends
-
Symfony\...\Request
Implements
- Illuminate\...\Arrayable
- ArrayAccess
Uses
Properties
$json Symfony\...\InputBag|null
The decoded JSON content for the request.
$convertedFiles array
All of the converted files for the request.
Methods
capture ( ) : static
Create a new Illuminate HTTP request from server variables.
instance ( ) : $this
Return the Request instance.
method ( ) : string
Get the request method.
root ( ) : string
Get the root URL for the application.
url ( ) : string
Get the URL (no query string) for the request.
fullUrl ( ) : string
Get the full URL for the request.
fullUrlWithQuery ( array $query ) : string
Get the full URL for the request with the added query string parameters.
Parameters
- $query array
fullUrlWithoutQuery ( $keys ) : string
Get the full URL for the request without the given query string parameters.
Parameters
- $keys array|string
path ( ) : string
Get the current path info for the request.
decodedPath ( ) : string
Get the current decoded path info for the request.
segment ( $index , $default ) : string|null
Get a segment from the URI (1 based index).
Parameters
- $index int
- $default string|null
segments ( ) : array
Get all of the segments for the request path.
is ( $patterns ) : bool
Determine if the current request URI matches a pattern.
Parameters
- $patterns mixed
routeIs ( $patterns ) : bool
Determine if the route name matches a given pattern.
Parameters
- $patterns mixed
fullUrlIs ( $patterns ) : bool
Determine if the current request URL and query string match a pattern.
Parameters
- $patterns mixed
host ( ) : string
Get the host name.
httpHost ( ) : string
Get the HTTP host being requested.
schemeAndHttpHost ( ) : string
Get the scheme and HTTP host.
ajax ( ) : bool
Determine if the request is the result of an AJAX call.
pjax ( ) : bool
Determine if the request is the result of a PJAX call.
prefetch ( ) : bool
Determine if the request is the result of a prefetch call.
secure ( ) : bool
Determine if the request is over HTTPS.
ip ( ) : string|null
Get the client IP address.
ips ( ) : array
Get the client IP addresses.
userAgent ( ) : string|null
Get the client user agent.
merge ( array $input ) : $this
Merge new input into the current request's input array.
Parameters
- $input array
mergeIfMissing ( array $input ) : $this
Merge new input into the request's input, but only when that key is missing from the request.
Parameters
- $input array
replace ( array $input ) : $this
Replace the input for the current request.
Parameters
- $input array
get ( string $key , mixed $default ) : mixed
This method belongs to Symfony HttpFoundation and is not usually needed when using Laravel.
Parameters
- $key string
- $default mixed
json ( $key , $default ) : Symfony\...\InputBag|mixed
Get the JSON payload for the request.
Parameters
- $key string|null
- $default mixed
getInputSource ( ) : Symfony\...\InputBag
Get the input source for the request.
createFrom ( $from , $to ) : static
Create a new request instance from the given Laravel request.
Parameters
createFromBase ( Symfony\...\Request $request ) : static
Create an Illuminate request from a Symfony instance.
Parameters
- $request Symfony\...\Request
duplicate ( array $query , array $request , array $attributes , array $cookies , array $files , array $server ) : static
{@inheritdoc}
filterFiles ( $files ) : mixed
Filter the given array of files, removing any empty values.
Parameters
- $files mixed
hasSession ( bool $skipIfUninitialized ) : void
{@inheritdoc}
getSession ( ) : void
{@inheritdoc}
setLaravelSession ( $session ) : void
Set the session instance on the request.
Parameters
- $session Session
setRequestLocale ( string $locale ) : void
Set the locale for the request instance.
Parameters
- $locale string
setDefaultRequestLocale ( string $locale ) : void
Set the default locale for the request instance.
Parameters
- $locale string
user ( $guard ) : mixed
Get the user making the request.
Parameters
- $guard string|null
route ( $param , $default ) : Route |object|string|null
Get the route handling the request.
Parameters
- $param string|null
- $default mixed
fingerprint ( ) : string
Get a unique fingerprint for the request / route / IP address.
setJson ( $json ) : $this
Set the JSON payload for the request.
Parameters
- $json Symfony\...\InputBag
setUserResolver ( Closure $callback ) : $this
Set the user resolver callback.
Parameters
- $callback Closure
setRouteResolver ( Closure $callback ) : $this
Set the route resolver callback.
Parameters
- $callback Closure
toArray ( ) : array
Get all of the input and files for the request.
offsetExists ( $offset ) : bool
Determine if the given offset exists.
Parameters
- $offset string
offsetGet ( $offset ) : mixed
Get the value at the given offset.
Parameters
- $offset string
offsetSet ( $offset , $value ) : void
Set the value at the given offset.
Parameters
- $offset string
- $value mixed
offsetUnset ( $offset ) : void
Remove the value at the given offset.
Parameters
- $offset string
__isset ( $key ) : bool
Check if an input element is set on the request.
Parameters
- $key string
__get ( $key ) : mixed
Get an input element from the request.
Parameters
- $key string