@@ 538-545 (lines=8) @@ | ||
535 | * @param bool $strict |
|
536 | * @return static |
|
537 | */ |
|
538 | public function whereIn($key, $values, $strict = false) |
|
539 | { |
|
540 | $values = $this->getArrayableItems($values); |
|
541 | ||
542 | return $this->filter(function ($item) use ($key, $values, $strict) { |
|
543 | return in_array(data_get($item, $key), $values, $strict); |
|
544 | }); |
|
545 | } |
|
546 | ||
547 | /** |
|
548 | * Filter items by the given key value pair using strict comparison. |
|
@@ 593-600 (lines=8) @@ | ||
590 | * @param bool $strict |
|
591 | * @return static |
|
592 | */ |
|
593 | public function whereNotIn($key, $values, $strict = false) |
|
594 | { |
|
595 | $values = $this->getArrayableItems($values); |
|
596 | ||
597 | return $this->reject(function ($item) use ($key, $values, $strict) { |
|
598 | return in_array(data_get($item, $key), $values, $strict); |
|
599 | }); |
|
600 | } |
|
601 | ||
602 | /** |
|
603 | * Filter items by the given key value pair using strict comparison. |