|
@@ 527-534 (lines=8) @@
|
| 524 |
|
* @param bool $strict |
| 525 |
|
* @return static |
| 526 |
|
*/ |
| 527 |
|
public function whereIn($key, $values, $strict = false) |
| 528 |
|
{ |
| 529 |
|
$values = $this->getArrayableItems($values); |
| 530 |
|
|
| 531 |
|
return $this->filter(function ($item) use ($key, $values, $strict) { |
| 532 |
|
return in_array(data_get($item, $key), $values, $strict); |
| 533 |
|
}); |
| 534 |
|
} |
| 535 |
|
|
| 536 |
|
/** |
| 537 |
|
* Filter items by the given key value pair using strict comparison. |
|
@@ 556-563 (lines=8) @@
|
| 553 |
|
* @param bool $strict |
| 554 |
|
* @return static |
| 555 |
|
*/ |
| 556 |
|
public function whereNotIn($key, $values, $strict = false) |
| 557 |
|
{ |
| 558 |
|
$values = $this->getArrayableItems($values); |
| 559 |
|
|
| 560 |
|
return $this->reject(function ($item) use ($key, $values, $strict) { |
| 561 |
|
return in_array(data_get($item, $key), $values, $strict); |
| 562 |
|
}); |
| 563 |
|
} |
| 564 |
|
|
| 565 |
|
/** |
| 566 |
|
* Filter items by the given key value pair using strict comparison. |