Methods summary
public static
string
|
#
uri( )
Get the URI for the current request.
Get the URI for the current request.
Returns
string
|
public static
string
|
#
method( )
Get the request method.
Returns
string
|
public static
string
|
#
server( string $key = null, mixed $default = null )
Get an item from the $_SERVER array.
Get an item from the $_SERVER array.
Parameters
- $key
string $key
- $default
mixed $default
Returns
string
|
public static
boolean
|
#
spoofed( )
Determine if the request method is being spoofed by a hidden Form
element.
Determine if the request method is being spoofed by a hidden Form
element.
Returns
boolean
|
public static
string
|
#
ip( mixed $default = '0.0.0.0' )
Get the requestor's IP address.
Get the requestor's IP address.
Parameters
Returns
string
|
public static
array
|
#
accept( )
Get the list of acceptable content types for the request.
Get the list of acceptable content types for the request.
Returns
array
|
public static
boolean
|
#
accepts( string $type )
Determine if the request accepts a given content type.
Determine if the request accepts a given content type.
Parameters
Returns
boolean
|
public static
array
|
#
languages( )
Get the languages accepted by the client's browser.
Get the languages accepted by the client's browser.
Returns
array
|
public static
boolean
|
#
secure( )
Determine if the current request is using HTTPS.
Determine if the current request is using HTTPS.
Returns
boolean
|
public static
boolean
|
#
forged( )
Determine if the request has been forged.
Determine if the request has been forged.
The session CSRF token will be compared to the CSRF token in the request
input.
Returns
boolean
|
public static
boolean
|
#
ajax( )
Determine if the current request is an AJAX request.
Determine if the current request is an AJAX request.
Returns
boolean
|
public static
string
|
#
referrer( )
Get the HTTP referrer for the request.
Get the HTTP referrer for the request.
Returns
string
|
public static
integer
|
#
time( )
Get the timestamp of the time when the request was started.
Get the timestamp of the time when the request was started.
Returns
integer
|
public static
boolean
|
#
cli( )
Determine if the current request is via the command line.
Determine if the current request is via the command line.
Returns
boolean
|
public static
string|null
|
#
env( )
Get the Laravel environment for the current request.
Get the Laravel environment for the current request.
Returns
string|null
|
public static
|
#
set_env( string $env )
Set the Laravel environment for the current request.
Set the Laravel environment for the current request.
Parameters
|
public static
boolean
|
#
is_env( string $env )
Determine the current request environment.
Determine the current request environment.
Parameters
Returns
boolean
|
public static
string|null
|
#
detect_env( array $environments, string $uri )
Detect the current environment from an environment configuration.
Detect the current environment from an environment configuration.
Parameters
- $environments
array $environments
- $uri
string $uri
Returns
string|null
|
public static
Route
|
#
route( )
Get the main route handling the request.
Get the main route handling the request.
Returns
Route
|
public static
HttpFoundation\Request
|
#
foundation( )
Get the Symfony HttpFoundation Request instance.
Get the Symfony HttpFoundation Request instance.
Returns
HttpFoundation\Request
|
public static
mixed
|
#
__callStatic( string $method, array $parameters )
Pass any other methods to the Symfony request.
Pass any other methods to the Symfony request.
Parameters
- $method
string $method
- $parameters
array $parameters
Returns
mixed
|