Make Input::only() and Input::except() into array_only() and array_except() helpers.

Signed-off-by: Colin Viebrock <colin@viebrock.ca>
This commit is contained in:
Colin Viebrock
2012-05-09 15:51:16 -05:00
parent be5eaf946c
commit 319c450f6f
2 changed files with 27 additions and 3 deletions

View File

@@ -127,7 +127,7 @@ class Input {
*/
public static function only($keys)
{
return array_intersect_key(static::get(), array_flip((array) $keys));
return array_only(static::get(), $keys);
}
/**
@@ -146,7 +146,7 @@ class Input {
*/
public static function except($keys)
{
return array_diff_key(static::get(), array_flip((array) $keys));
return array_except(static::get(), $keys);
}
/**
@@ -207,7 +207,7 @@ class Input {
{
return ! is_null(static::file("{$key}.tmp_name"));
}
/**
* Move an uploaded file to permanent storage.
*