@@ 563-570 (lines=8) @@ | ||
560 | * @param bool $strict |
|
561 | * @return static |
|
562 | */ |
|
563 | public function whereIn($key, $values, $strict = false) |
|
564 | { |
|
565 | $values = $this->getArrayableItems($values); |
|
566 | ||
567 | return $this->filter(function ($item) use ($key, $values, $strict) { |
|
568 | return in_array(data_get($item, $key), $values, $strict); |
|
569 | }); |
|
570 | } |
|
571 | ||
572 | /** |
|
573 | * Filter items by the given key value pair using strict comparison. |
|
@@ 592-599 (lines=8) @@ | ||
589 | * @param bool $strict |
|
590 | * @return static |
|
591 | */ |
|
592 | public function whereNotIn($key, $values, $strict = false) |
|
593 | { |
|
594 | $values = $this->getArrayableItems($values); |
|
595 | ||
596 | return $this->reject(function ($item) use ($key, $values, $strict) { |
|
597 | return in_array(data_get($item, $key), $values, $strict); |
|
598 | }); |
|
599 | } |
|
600 | ||
601 | /** |
|
602 | * Filter items by the given key value pair using strict comparison. |