PHPackages                             bipinkareparambil/laravel-where-like-any - 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. [Database &amp; ORM](/categories/database)
4. /
5. bipinkareparambil/laravel-where-like-any

ActiveLibrary[Database &amp; ORM](/categories/database)

bipinkareparambil/laravel-where-like-any
========================================

Adds whereLikeAny, whereLikeAll, whereNotLikeAny, whereNotLikeAll (and or\* variants) to Laravel's query builder.

v1.0.0(1mo ago)00MITPHPPHP ^8.2

Since Apr 17Pushed 1mo agoCompare

[ Source](https://github.com/bipinks/laravel-where-like-any)[ Packagist](https://packagist.org/packages/bipinkareparambil/laravel-where-like-any)[ RSS](/packages/bipinkareparambil-laravel-where-like-any/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (4)Versions (2)Used By (0)

laravel-where-like-any
======================

[](#laravel-where-like-any)

Adds symmetric "one column, multiple patterns" LIKE filtering to Laravel's query builder, complementing the built-in `whereAny` / `whereAll` (which handle "multiple columns, one pattern").

Install
-------

[](#install)

```
composer require bipinkareparambil/laravel-where-like-any
```

The service provider auto-registers. The new methods are available on `Illuminate\Database\Query\Builder` and, by extension, Eloquent builders.

Methods
-------

[](#methods)

MethodSQL`whereLikeAny($col, $values)``(col LIKE ? OR col LIKE ?)``whereNotLikeAny($col, $values)``(col NOT LIKE ? AND col NOT LIKE ?)``whereLikeAll($col, $values)``(col LIKE ? AND col LIKE ?)``whereNotLikeAll($col, $values)``(col NOT LIKE ? OR col NOT LIKE ?)`Plus `or` variants: `orWhereLikeAny`, `orWhereNotLikeAny`, `orWhereLikeAll`, `orWhereNotLikeAll`.

All methods accept a `$caseSensitive` flag. Under the hood each call delegates to `whereLike`, so MySQL `like binary`, Postgres `ilike`, and SQLite `glob` all work automatically — no grammar changes.

Usage
-----

[](#usage)

```
// Match any pattern
User::whereLikeAny('name', ['%john%', '%jane%'])->get();

// Match all patterns
User::whereLikeAll('bio', ['%laravel%', '%php%'])->get();

// Exclude any pattern
User::whereNotLikeAny('email', ['%spam%', '%temp%'])->get();

// Case-sensitive on MySQL
User::whereLikeAny('name', ['%John%'], caseSensitive: true)->get();
```

### Negation semantics (De Morgan's)

[](#negation-semantics-de-morgans)

- `whereNotLikeAny` negates "match any" → flips `OR` to `AND`.
- `whereNotLikeAll` negates "match all" → flips `AND` to `OR`.

Tests
-----

[](#tests)

```
composer install
vendor/bin/phpunit
```

Why a package?
--------------

[](#why-a-package)

Originally proposed to Laravel core in [laravel/framework#59725](https://github.com/laravel/framework/pull/59725). Released as a package per maintainer preference to keep the core surface area small.

License
-------

[](#license)

MIT

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance89

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

53d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/855a8f473fc829b74e0c333adc39bc1d501ec77964c686c2d294a2427e20fe42?d=identicon)[bipinks](/maintainers/bipinks)

---

Top Contributors

[![bipinks](https://avatars.githubusercontent.com/u/10153864?v=4)](https://github.com/bipinks "bipinks (1 commits)")

---

Tags

laraveleloquentquery builderlikewhere-like

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bipinkareparambil-laravel-where-like-any/health.svg)

```
[![Health](https://phpackages.com/badges/bipinkareparambil-laravel-where-like-any/health.svg)](https://phpackages.com/packages/bipinkareparambil-laravel-where-like-any)
```

###  Alternatives

[kirschbaum-development/eloquent-power-joins

The Laravel magic applied to joins.

1.6k29.9M42](/packages/kirschbaum-development-eloquent-power-joins)[mongodb/laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel

7.1k8.0M84](/packages/mongodb-laravel-mongodb)[spatie/laravel-sluggable

Generate slugs when saving Eloquent models

1.5k12.4M291](/packages/spatie-laravel-sluggable)[cybercog/laravel-love

Make Laravel Eloquent models reactable with any type of emotions in a minutes!

1.2k322.4k1](/packages/cybercog-laravel-love)[psalm/plugin-laravel

Psalm plugin for Laravel

3325.1M337](/packages/psalm-plugin-laravel)[watson/validating

Eloquent model validating trait.

9743.4M53](/packages/watson-validating)

PHPackages © 2026

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