Download the PHP package bipinkareparambil/laravel-where-like-any without Composer
On this page you can find all versions of the php package bipinkareparambil/laravel-where-like-any. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download bipinkareparambil/laravel-where-like-any
More information about bipinkareparambil/laravel-where-like-any
Files in bipinkareparambil/laravel-where-like-any
Package laravel-where-like-any
Short Description Adds whereLikeAny, whereLikeAll, whereNotLikeAny, whereNotLikeAll (and or* variants) to Laravel's query builder.
License MIT
Informations about the package 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
The service provider auto-registers. The new methods are available on Illuminate\Database\Query\Builder and, by extension, Eloquent builders.
Methods
| Method | SQL |
|---|---|
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
Negation semantics (De Morgan's)
whereNotLikeAnynegates "match any" → flipsORtoAND.whereNotLikeAllnegates "match all" → flipsANDtoOR.
Tests
Why a package?
Originally proposed to Laravel core in laravel/framework#59725. Released as a package per maintainer preference to keep the core surface area small.
License
MIT
All versions of laravel-where-like-any with dependencies
illuminate/database Version ^11.0|^12.0|^13.0
illuminate/support Version ^11.0|^12.0|^13.0