added default value to Input::file and defaulted Validator::make.
This commit is contained in:
@@ -76,7 +76,7 @@ class Input {
|
||||
* @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);
|
||||
}
|
||||
|
||||
@@ -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 @@ class Validator {
|
||||
* @param mixed $target
|
||||
* @return Validator
|
||||
*/
|
||||
public static function of($target)
|
||||
public static function make($target = array())
|
||||
{
|
||||
return new static($target);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user