Commit 52390c4a authored by Taylor Otwell's avatar Taylor Otwell

Added ability to pass multiple items to Input::has_old.

parent 65dca249
......@@ -45,14 +45,21 @@ class Input {
}
/**
* Determine if the old input data contains an item.
* Determine if the old input data contains an item or set of items.
*
* @param string $key
* @return bool
*/
public static function has_old($key)
public static function has_old()
{
foreach (func_get_args() as $key)
{
return ( ! is_null(static::old($key)));
if (is_null($value = static::old($key)) or trim((string) $value) == '')
{
return false;
}
}
return true;
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment