whereIn() public method

Filter items by the given key value pair.
public whereIn ( string $key, mixed $values, boolean $strict = false ) : static
$key string
$values mixed
$strict boolean
return static
Example #1
0
 public function testWhereIn()
 {
     $c = new Collection([['v' => 1], ['v' => 2], ['v' => 3], ['v' => '3'], ['v' => 4]]);
     $this->assertEquals([['v' => 1], ['v' => 3]], $c->whereIn('v', [1, 3])->values()->all());
 }