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. wahlemedia/laravel-where-in-array

ActiveLibrary

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 2d 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 32% 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

1750d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/176dc6ca62f9e2f079b96ebfd96af332c513f294f4094437324a05d39977c2c8?d=identicon)[wahlemedia](/maintainers/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

[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[spatie/laravel-prometheus

Export Laravel metrics to Prometheus

2651.3M6](/packages/spatie-laravel-prometheus)[hydrat/filament-table-layout-toggle

Filament plugin adding a toggle button to tables, allowing user to switch between Grid and Table layouts.

6292.3k1](/packages/hydrat-filament-table-layout-toggle)[scalar/laravel

Render your OpenAPI-based API reference

6183.9k2](/packages/scalar-laravel)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[musahmusah/laravel-multipayment-gateways

A Laravel Package that makes implementation of multiple payment Gateways endpoints and webhooks seamless

852.2k1](/packages/musahmusah-laravel-multipayment-gateways)

PHPackages © 2026

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