Input

Input
Input::get('key');
// Default if the key is missing
 Input::get('key', 'default');
Input::has('key');
Input::all();
// Only retrieve 'foo' and 'bar' when getting input
 Input::only('foo', 'bar');
// Disregard 'foo' when getting input
 Input::except('foo');
Input::flush();
Session Input (flash)
// Flash input to the session
 Input::flash();
// Flash only some of the input to the session
 Input::flashOnly('foo', 'bar');
// Flash only some of the input to the session
 Input::flashExcept('foo', 'baz');
// Retrieve an old input item
 Input::old('key','default_value');
Files
// Use a file that's been uploaded
 Input::file('filename');
// Determine if a file was uploaded
 Input::hasFile('filename');
// Access file properties
 Input::file('name')->getRealPath();
Input::file('name')->getClientOriginalName();
Input::file('name')->getClientOriginalExtension();
Input::file('name')->getSize();
Input::file('name')->getMimeType();
// Move an uploaded file
 Input::file('name')->move($destinationPath);
// Move an uploaded file
 Input::file('name')->move($destinationPath, $fileName);

Last updated