Request
class Request extends Request implements Arrayable, ArrayAccess (View source)
Traits
Methods
Dynamically handle calls to the class.
Dynamically handle calls to the class.
Return the Request instance.
Get the request method.
Get the root URL for the application.
Get the URL (no query string) for the request.
Get the full URL for the request.
Get the full URL for the request with the added query string parameters.
Get the current path info for the request.
Get the current encoded path info for the request.
Get a segment from the URI (1 based index).
Get all of the segments for the request path.
Determine if the current request URI matches a pattern.
Determine if the current request URL and query string matches a pattern.
Determine if the request is the result of an AJAX call.
Determine if the request is the result of an PJAX call.
Determine if the request is over HTTPS.
Returns the client IP address.
Returns the client IP addresses.
Determine if the request contains a given input item key.
Determine if the request contains a non-empty value for an input item.
Get all of the input and files for the request.
Retrieve an input item from the request.
Get a subset of the items from the input data.
Get all of the input except for a specified array of items.
Intersect an array of items with the input data.
Retrieve a query string item from the request.
Determine if a cookie is set on the request.
Retrieve a cookie from the request.
Get an array of all of the files on the request.
Retrieve a file from the request.
Determine if the uploaded data contains a file.
Determine if a header is set on the request.
Retrieve a header from the request.
Retrieve a server variable from the request.
Retrieve an old input item.
Flash the input for the current request to the session.
Flash only some of the input to the session.
Flash only some of the input to the session.
Flush all of the old input from the session.
Merge new input into the current request's input array.
Replace the input for the current request.
Get the JSON payload for the request.
Determine if the given content types match.
Determine if the request is sending JSON.
Determine if the current request is asking for JSON in return.
Determines whether the current requests accepts a given content type.
Return the most suitable content type from the given array based on content negotiation.
Determines whether a request accepts JSON.
Determines whether a request accepts HTML.
Get the data format expected in the response.
Get the bearer token from the request headers.
Create an Illuminate request from a Symfony instance.
{@inheritdoc}
Get the user making the request.
Get a unique fingerprint for the request / route / IP address.
Get the user resolver callback.
Get the route resolver callback.
Get all of the input and files for the request.
Determine if the given offset exists.
Get the value at the given offset.
Set the value at the given offset.
Remove the value at the given offset.
Check if an input element is set on the request.
Get an input element from the request.
Details
static
mixed
__callStatic(
string $method,
array $parameters)
Dynamically handle calls to the class.
at line line 53
static
Request
capture()
Create a new Illuminate HTTP request from server variables.
at line line 120
string
fullUrlWithQuery(
array $query)
Get the full URL for the request with the added query string parameters.
at line line 156
string|null
segment(
int $index,
string|null $default = null)
Get a segment from the URI (1 based index).
at line line 198
bool
fullUrlIs()
Determine if the current request URL and query string matches a pattern.
at line line 267
bool
exists(
string|array $key)
Determine if the request contains a given input item key.
at line line 288
bool
has(
string|array $key)
Determine if the request contains a non-empty value for an input item.
at line line 333
string|array
input(
string $key = null,
string|array|null $default = null)
Retrieve an input item from the request.
at line line 367
array
except(
array|mixed $keys)
Get all of the input except for a specified array of items.
at line line 384
array
intersect(
array|mixed $keys)
Intersect an array of items with the input data.
at line line 396
string|array
query(
string $key = null,
string|array|null $default = null)
Retrieve a query string item from the request.
at line line 419
string|array
cookie(
string $key = null,
string|array|null $default = null)
Retrieve a cookie from the request.
at line line 464
UploadedFile|array|null
file(
string $key = null,
mixed $default = null)
Retrieve a file from the request.
at line line 519
string|array
header(
string $key = null,
string|array|null $default = null)
Retrieve a header from the request.
at line line 531
string|array
server(
string $key = null,
string|array|null $default = null)
Retrieve a server variable from the request.
at line line 543
string|array
old(
string $key = null,
string|array|null $default = null)
Retrieve an old input item.
at line line 555
void
flash(
string $filter = null,
array $keys = array())
Flash the input for the current request to the session.
at line line 644
mixed
json(
string $key = null,
mixed $default = null)
Get the JSON payload for the request.
at line line 678
static
bool
matchesType(
string $actual,
string $type)
Determine if the given content types match.
at line line 717
bool
accepts(
string|array $contentTypes)
Determines whether the current requests accepts a given content type.
at line line 748
string|null
prefers(
string|array $contentTypes)
Return the most suitable content type from the given array based on content negotiation.
at line line 799
string
format(
string $default = 'html')
Get the data format expected in the response.
at line line 830
static
Request
createFromBase(
Request $request)
Create an Illuminate request from a Symfony instance.
at line line 855
duplicate(
array $query = null,
array $request = null,
array $attributes = null,
array $cookies = null,
array $files = null,
array $server = null)
{@inheritdoc}
at line line 894
Route|object|string
route(
string|null $param = null)
Get the route handling the request.
at line line 912
string
fingerprint()
Get a unique fingerprint for the request / route / IP address.