added upload_of validation rule.

This commit is contained in:
Taylor Otwell
2011-06-26 08:44:31 -05:00
parent 0b7dbab0af
commit abfaeaff4d
2 changed files with 63 additions and 0 deletions

View File

@@ -69,6 +69,18 @@ class Input {
return Arr::get(Session::get('laravel_old_input', array()), $key, $default);
}
/**
* Get an item from the uploaded file data.
*
* @param string $key
* @param mixed $default
* @return array
*/
public static function file($key, $default = null)
{
return Arr::get($_FILES, $key, $default);
}
/**
* Hydrate the input data for the request.
*