PHPackages                             wahlemedia/laravel-where-in-array - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. wahlemedia/laravel-where-in-array

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

wahlemedia/laravel-where-in-array
=================================

A small package to check if an value of an array is containted within a given array.

1.0.0(4y ago)03MITPHPPHP ^8.0

Since Jul 27Pushed 4y ago1 watchersCompare

[ Source](https://github.com/wahlemedia/laravel-where-in-array)[ Packagist](https://packagist.org/packages/wahlemedia/laravel-where-in-array)[ Docs](https://github.com/wahlemedia/laravel-where-in-array)[ GitHub Sponsors](https://github.com/wahlemedia)[ RSS](/packages/wahlemedia-laravel-where-in-array/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (1)Dependencies (8)Versions (2)Used By (0)

A small package to verify if an value in an array is containted within a given array.
=====================================================================================

[](#a-small-package-to-verify-if-an-value-in-an-array-is-containted-within-a-given-array)

[![Latest Version on Packagist](https://camo.githubusercontent.com/127dd75b2b3ae04c7bbf07c15e296990cd8f85a90ac1d89e8c1f1f57b699fe69/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7761686c656d656469612f6c61726176656c2d77686572652d696e2d61727261792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/wahlemedia/laravel-where-in-array)[![GitHub Tests Action Status](https://camo.githubusercontent.com/55f442040e03186cd8b522da873e9c5e1e2bf5a20b5753f2ce1880fb56bb4a74/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f7761686c656d656469612f6c61726176656c2d77686572652d696e2d61727261792f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/wahlemedia/laravel-where-in-array/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/cf3714191521304d028b800b287a5e1a6b1f695f63a24b768a28b5de1fa8481a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f7761686c656d656469612f6c61726176656c2d77686572652d696e2d61727261792f436865636b253230262532306669782532307374796c696e673f6c6162656c3d636f64652532307374796c65)](https://github.com/wahlemedia/laravel-where-in-array/actions?query=workflow%3A%22Check+%26+fix+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/6badb4907cb19e7777b599e34985cba3dc262352ef38f02df91360c6bca25128/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7761686c656d656469612f6c61726176656c2d77686572652d696e2d61727261792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/wahlemedia/laravel-where-in-array)

This package adds two helper functions to the builder to search multible values within an string or an array.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require wahlemedia/laravel-where-in-array
```

Usage
-----

[](#usage)

In your Model you need to have an json object to store an array within

```
// Your Model Migration
Schema::create('your_model', function (Blueprint $table) {
    //...
    $table->json('some_attribute')->nullable();
    //...
});
```

If you are working with array, you should cast the field of your model

```
    protected $casts = [
        'some_attribute' => 'array',
    ];
```

The function you can use by calling the following methods

```
Model::whereInArray('some_attribute', ['php', 'vue']) // or
Model::whereNotInArray('some_attribute', ['foo'])
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Philipp Wahle](https://github.com/fudra)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1801d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/16420523?v=4)[wahlemedia](/maintainers/wahlemedia)[@wahlemedia](https://github.com/wahlemedia)

---

Top Contributors

[![philwahle](https://avatars.githubusercontent.com/u/7325418?v=4)](https://github.com/philwahle "philwahle (6 commits)")[![fudra](https://avatars.githubusercontent.com/u/198921614?v=4)](https://github.com/fudra "fudra (2 commits)")

---

Tags

laravelwahlemedialaravel-where-in-array

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/wahlemedia-laravel-where-in-array/health.svg)

```
[![Health](https://phpackages.com/badges/wahlemedia-laravel-where-in-array/health.svg)](https://phpackages.com/packages/wahlemedia-laravel-where-in-array)
```

###  Alternatives

[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M47](/packages/spatie-laravel-pdf)[codewithdennis/filament-select-tree

The multi-level select field enables you to make single selections from a predefined list of options that are organized into multiple levels or depths.

329530.5k29](/packages/codewithdennis-filament-select-tree)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

124603.0k](/packages/worksome-exchange)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)[stephenjude/laravel-wallet

A simple wallet implementation for Laravel

26611.9k](/packages/stephenjude-laravel-wallet)[tarfin-labs/event-machine

Event-driven state machines for Laravel with event sourcing, type-safe context, and full audit trail.

199.4k](/packages/tarfin-labs-event-machine)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
