mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-app.git
synced 2026-06-24 06:40:23 +00:00
✨ Add whereLike and orWhereLike macros for driver-agnostic case-insensitive searches
- 🔄 Replace `ilike`/`like` conditions with `whereLike` in API controllers and search tools for consistency. - 🚀 Enhance query usability by ensuring cross-database compatibility (PostgreSQL and SQLite).
This commit is contained in:
@@ -26,8 +26,8 @@ class ListCountriesTool extends Tool
|
||||
->when(
|
||||
$search,
|
||||
fn (Builder $query) => $query
|
||||
->where('name', 'ilike', "%{$search}%")
|
||||
->orWhere('code', 'ilike', "%{$search}%"),
|
||||
->whereLike('name', "%{$search}%")
|
||||
->orWhereLike('code', "%{$search}%"),
|
||||
)
|
||||
->limit(10)
|
||||
->get()
|
||||
|
||||
Reference in New Issue
Block a user