Methods summary
public static
array
|
#
all( )
Get all of the input data for the request, including files.
Get all of the input data for the request, including files.
Returns
array
|
public static
boolean
|
#
has( string $key )
Determine if the input data contains an item.
Determine if the input data contains an item.
If the input item is an empty string, false will be returned.
Parameters
Returns
boolean
|
public static
mixed
|
#
get( string $key = null, mixed $default = null )
Get an item from the input data.
Get an item from the input data.
This method is used for all request verbs (GET, POST, PUT, and DELETE).
$email = Input::get('email');
$email = Input::get('name', 'Taylor');
Parameters
- $key
string $key
- $default
mixed $default
Returns
mixed
|
public static
mixed
|
#
query( string $key = null, mixed $default = null )
Get an item from the query string.
Get an item from the query string.
$email = Input::query('email');
$email = Input::query('name', 'Taylor');
Parameters
- $key
string $key
- $default
mixed $default
Returns
mixed
|
public static
object
|
#
json( boolean $as_array = false )
Get the JSON payload for the request.
Get the JSON payload for the request.
Parameters
- $as_array
boolean $as_array
Returns
object
|
public static
array
|
#
only( array $keys )
Get a subset of the items from the input data.
Get a subset of the items from the input data.
$value = Input::only('email');
$input = Input::only(array('username', 'email'));
Parameters
Returns
array
|
public static
array
|
#
except( array $keys )
Get all of the input data except for a specified array of items.
Get all of the input data except for a specified array of items.
$input = Input::except('username');
$input = Input::except(array('username', 'email'));
Parameters
Returns
array
|
public static
boolean
|
#
had( string $key )
Determine if the old input data contains an item.
Determine if the old input data contains an item.
Parameters
Returns
boolean
|
public static
string
|
#
old( string $key = null, mixed $default = null )
Get input data from the previous request.
Get input data from the previous request.
$email = Input::old('email');
$email = Input::old('name', 'Taylor');
Parameters
- $key
string $key
- $default
mixed $default
Returns
string
|
public static
UploadedFile
|
#
file( string $key = null, mixed $default = null )
Get an item from the uploaded file data.
Get an item from the uploaded file data.
$picture = Input::file('picture');
Parameters
- $key
string $key
- $default
mixed $default
Returns
UploadedFile
|
public static
boolean
|
#
has_file( string $key )
Determine if the uploaded data contains a file.
Determine if the uploaded data contains a file.
Parameters
Returns
boolean
|
public static
Symfony\Component\HttpFoundation\File\File
|
#
upload( string $key, string $directory, string $name = null )
Move an uploaded file to permanent storage.
Move an uploaded file to permanent storage.
This method is simply a convenient wrapper around move_uploaded_file.
Input::upload('picture', 'path/to/photos', 'picture.jpg');
Parameters
- $key
string $key
- $directory
string $directory
- $name
string $name
Returns
|
public static
|
#
flash( string $filter = null, array $keys = array() )
Flash the input for the current request to the session.
Flash the input for the current request to the session.
Input::flash();
Input::flash('only', array('name', 'email'));
Input::flash('except', array('password', 'social_number'));
Parameters
- $filter
string $filter
- $keys
array $keys
|
public static
|
#
flush( )
Flush all of the old input from the session.
Flush all of the old input from the session.
|
public static
|
#
merge( array $input )
Merge new input into the current request's input array.
Merge new input into the current request's input array.
Parameters
|
public static
|
#
replace( array $input )
Replace the input for the current request.
Replace the input for the current request.
Parameters
|
public static
|
#
clear( )
Clear the input for the current request.
Clear the input for the current request.
|