added default value to Input::file and defaulted Validator::make.
This commit is contained in:
parent
9f7da5cb39
commit
dc01b3c26e
|
@ -76,7 +76,7 @@ public static function old($key = null, $default = null)
|
||||||
* @param mixed $default
|
* @param mixed $default
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public static function file($key, $default = null)
|
public static function file($key = null, $default = null)
|
||||||
{
|
{
|
||||||
return Arr::get($_FILES, $key, $default);
|
return Arr::get($_FILES, $key, $default);
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@ class Validator {
|
||||||
* @param mixed $target
|
* @param mixed $target
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function __construct($target)
|
public function __construct($target = array())
|
||||||
{
|
{
|
||||||
// ---------------------------------------------------------
|
// ---------------------------------------------------------
|
||||||
// If the source is an Eloquent model, use the model's
|
// If the source is an Eloquent model, use the model's
|
||||||
|
@ -44,7 +44,7 @@ public function __construct($target)
|
||||||
* @param mixed $target
|
* @param mixed $target
|
||||||
* @return Validator
|
* @return Validator
|
||||||
*/
|
*/
|
||||||
public static function of($target)
|
public static function make($target = array())
|
||||||
{
|
{
|
||||||
return new static($target);
|
return new static($target);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue