diff --git a/src/Illuminate/Http/Request.php b/src/Illuminate/Http/Request.php index 04809b711c98..edcab364e5dc 100755 --- a/src/Illuminate/Http/Request.php +++ b/src/Illuminate/Http/Request.php @@ -375,6 +375,17 @@ public function except($keys) return $results; } + /** + * Intersect an array of items with the input data. + * + * @param array|mixed $keys + * @return array + */ + public function intersect($keys) + { + return array_filter($this->only($keys)); + } + /** * Retrieve a query string item from the request. *