Request
class Request (View source)
Methods
Check if file exists
Request constructor
Get Request header
Check if a header exists.
Check if the query is of type PUT
Returns the method of the request.
Retrieve a value or a collection of values.
Get the request ID
Set the request id
Alias of getId
Check if key is existing
Get all input value
Get url sent by client.
Origin the name of the server + the scheme
Get the host name of the server.
Get uri send by client.
Get path sent by client.
Check if the query is POST
Check if the query is of type GET
Check if the query is DELETE
Load the factory for FILES
Get previous request data
Singletons loader
Check if we are in the case of an AJAX request.
No description
Check if a url matches with the pattern
Check if a url matches with the pattern
Get the source of the current request.
Get client address
Get client port
Get the request locale.
Get request lang.
Get request protocol
Check if the secure protocol
Check the protocol of the request
Get Request header
Get the client user agent
Get auth user information
Get cookie
Retrieves the values contained in the exception table
Retrieves the rest of values
Set the shared value in request bags
Get the shared value in request bags
Get the shared value in request bags
Set the shared value in request bags
__call
Details
static bool
hasFile(mixed $file)
Check if file exists
mixed
capture()
Request constructor
string|null
getHeader(string $key)
Get Request header
bool
hasHeader(string $key)
Check if a header exists.
bool
isPut()
Check if the query is of type PUT
string|null
method()
Returns the method of the request.
mixed
get(string $key, mixed $default = null)
Retrieve a value or a collection of values.
string|int
getId()
Get the request ID
void
setId(string|int $id)
Set the request id
string|int
id()
Alias of getId
bool
has(string $key)
Check if key is existing
array
all()
Get all input value
string
url()
Get url sent by client.
string
origin()
Origin the name of the server + the scheme
string
hostname()
Get the host name of the server.
string
path()
Get uri send by client.
string
time()
Get path sent by client.
bool
isPost()
Check if the query is POST
bool
isGet()
Check if the query is of type GET
bool
isDelete()
Check if the query is DELETE
Collection|null
file(string $key)
Load the factory for FILES
mixed
old(string $key, mixed $fullback)
Get previous request data
static Request
getInstance()
Singletons loader
bool
isAjax()
Check if we are in the case of an AJAX request.
bool
wantsJson()
No description
bool
is(string $match)
Check if a url matches with the pattern
bool
isReferer(string $match)
Check if a url matches with the pattern
string
referer()
Get the source of the current request.
string|null
ip()
Get client address
string|null
port()
Get client port
string|null
locale()
Get the request locale.
The local is the original language of the client e.g fr => locale = fr_FR e.g en => locale [ en_US, en_EN]
string|null
lang()
Get request lang.
string
protocol()
Get request protocol
bool
isSecure()
Check if the secure protocol
bool
isProtocol(string $protocol)
Check the protocol of the request
array
getHeaders()
Get Request header
string|null
userAgent()
Get the client user agent
Session
session()
Get session information
Authentication|null
user(string|null $guard = null)
Get auth user information
string|array|object|null
cookie(string|null $property = null)
Get cookie
array
only(array $exceptions = [])
Retrieves the values contained in the exception table
array
ignore(array $ignores = [])
Retrieves the rest of values
Validate
validate(array $rule)
Validate incoming data
void
setBag(string $name, mixed $value)
Set the shared value in request bags
mixed
getBag(string $name)
Get the shared value in request bags
array
getBags()
Get the shared value in request bags
void
setBags(array $bags)
Set the shared value in request bags
mixed
__get($property)
__call