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:
HolgerHatGarKeineNode
2026-06-14 01:32:03 +02:00
parent 6239842b15
commit f93190f029
14 changed files with 42 additions and 28 deletions
@@ -50,7 +50,7 @@ class CourseController extends Controller
->when(
$request->search,
fn (Builder $query) => $query
->where('name', 'ilike', "%{$request->search}%")
->whereLike('name', "%{$request->search}%")
)
->when(
$request->exists('selected'),