added default value to Input::file and defaulted Validator::make.

This commit is contained in:
Taylor Otwell 2011-06-26 09:10:11 -05:00
parent 9f7da5cb39
commit dc01b3c26e
2 changed files with 3 additions and 3 deletions

View File

@ -76,7 +76,7 @@ public static function old($key = null, $default = null)
* @param mixed $default
* @return array
*/
public static function file($key, $default = null)
public static function file($key = null, $default = null)
{
return Arr::get($_FILES, $key, $default);
}

View File

@ -29,7 +29,7 @@ class Validator {
* @param mixed $target
* @return void
*/
public function __construct($target)
public function __construct($target = array())
{
// ---------------------------------------------------------
// If the source is an Eloquent model, use the model's
@ -44,7 +44,7 @@ public function __construct($target)
* @param mixed $target
* @return Validator
*/
public static function of($target)
public static function make($target = array())
{
return new static($target);
}