Skip to content

Commit

Permalink
Intersect Method for Illuminate Request (#13167)
Browse files Browse the repository at this point in the history
  • Loading branch information
AdenFraser authored and taylorotwell committed Apr 15, 2016
1 parent 0d422f1 commit 913487a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/Illuminate/Http/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down

0 comments on commit 913487a

Please sign in to comment.