mohammad-fouladgar/eloquent-builder
EloquentBuilder and define rules in a config file or service. Reduces repetitive if-else chains in controllers.whereJsonContains, when() clauses).spatie/laravel-query-builder)?has, whereHas)? Could it generate inefficient SQL?age_more_than=abc) handled?beberlei/assert, laravel-query-filter) that offer similar functionality with better maintenance?/admin/users with 10+ filters).where() chains in controllers with EloquentBuilder rules.config/eloquent-builder.php) or database table for dynamic updates.'users' => [
'age_more_than' => ['operator' => '>=', 'column' => 'age'],
'has_published_post' => ['operator' => 'has', 'method' => 'posts'],
],
where, orWhere, has, and whereHas. May need extensions for:
whereRaw).withTrashed() is handled if needed.Request object out of the box. For GraphQL, may need a custom adapter.EloquentBuilder and test rule logic in isolation.author.has_published_books=true).contains, startsWith).if-else blocks in controllers → easier to maintain.age, gender).paginate() to avoid memory issues.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Malformed input (e.g., SQLi) | Data corruption or leaks | Validate inputs via Laravel Requests. |
| Unindexed columns | Slow queries, timeouts | Add database indexes; monitor queries. |
| Package incompatibility | Broken queries | Fork and maintain locally. |
| Rule misconfiguration | Incorrect filtering | Unit tests for all rule sets. |
| Database connection issues | API timeouts | Retry logic + circuit breakers. |
=, >=, has).if blocks").How can I help you explore Laravel packages today?