Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Laravel Eloquent Filter

Laravel Eloquent Filter Laravel Package

abdrzakoxa/laravel-eloquent-filter

A Laravel package for adding reusable, query-string-driven filters to Eloquent models. Define filters once and apply them through simple request parameters to keep controllers clean and queries flexible.

View on GitHub
Deep Wiki
Context7

Make your laravel eloquent search scalable and simple

Frequently asked questions about Laravel Eloquent Filter
How do I install abdrzakoxa/laravel-eloquent-filter?
Install it with Composer using composer require abdrzakoxa/laravel-eloquent-filter. Version 1.1.0 is the release that adds Laravel 9 support, so pin that version explicitly if you need framework 9 compatibility. After installing, review the diff in your composer.lock and confirm the declared illuminate/* constraint range matches your application before running your test suite.
Which Laravel versions does this package support?
The only release evidence available is version 1.1.0 with the note "Support Laravel 9." It is not documented in that note whether Laravel 8 support was retained or dropped in the same minor release. Check the package's composer.json constraint range directly, and test against your exact framework version before adopting it.
What PHP version do I need to use this package?
Because Laravel 9 requires PHP 8.0 or higher, running this package on a Laravel 9 application means you need at least PHP 8.0. The package's own declared PHP constraint should be verified in composer.json rather than assumed. If you are still on PHP 7.x, this version is likely not usable and you should stay on an earlier release.
How do I define and apply a filter to an Eloquent model?
The package lets you define a filter once and then apply it through simple request query-string parameters on your Eloquent queries. This keeps filter logic out of controllers and makes query behavior configurable from the URL. The exact filter class or method signature is not covered in the available documentation, so check the repository README for the concrete API before writing filters.
Can I keep using Eloquent local scopes and relationships alongside these filters?
Yes in principle, since the package builds on Eloquent rather than replacing it, so existing scopes, relationships, and eager loads should still compose with filtered queries. The filters are an additional layer for request-driven conditions, not a substitute for your domain query logic. Verify by smoke-testing the code paths that combine your existing scopes with package filters.
How should I test filters in a Laravel application?
Write feature tests that hit your endpoints with representative query strings and assert both the returned records and the generated SQL constraints. Cover edge cases like missing parameters, invalid values, and combined filters, since those are where request-driven filtering usually breaks. Also confirm whether the package itself is CI-tested against a Laravel 9 version matrix, because that is not established by the one-line release note.
What should I verify before using this package in production?
Treat adoption as a spike rather than a straight deployment: branch from a representative service, pin version 1.1.0, and run composer update --with-dependencies so the lockfile diff shows what actually changed. Run your full test suite plus a manual smoke test of every code path that touches the package. Check your PHP version, your other illuminate/*-constrained packages, and the package's declared constraint range for conflicts before merging.
Does this package work with Laravel 10 or Laravel 11?
There is no evidence in scope indicating support beyond Laravel 9, since 1.1.0 is the only release referenced and its note mentions only Laravel 9. Installing on newer framework versions may work if the constraints are permissive, but that is unverified and should not be assumed. Check the repository and Packagist metadata for newer releases before planning an upgrade path.
How does this package compare to spatie/laravel-query-builder?
Both aim to move request-driven filtering out of controllers and into reusable, declarative definitions, but the available documentation for this package is too thin to compare APIs, feature depth, or performance. Spatie's package is more widely known and documented, which matters if your team values community support and examples. Evaluate this one on its fit with your existing query patterns, its constraint range, and its maintenance signals rather than on feature checklists alone.
Is the package actively maintained, and what license does it use?
There is no repository metadata, release cadence, issue backlog, ownership, or license information in the evidence available here. That makes maintenance health unknown rather than positive or negative. Before depending on it, check the GitHub repository for recent commits, tagged releases, open issues, and the LICENSE file, and consider whether you could vendor or replace the package if it stalls.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo
bernskioldmedia/laravel-harvest
bernskiold/laravel-data-scrubber
bernskiold/laravel-currency-converter
bernskiold/laravel-campaign-monitor
bernskioldmedia/laravel-autotranslate
siberfx/telegram-bot
roy-sandip/laravel-view-extended
gregsphotography/site-builder-core
roy-sandip/laravel-view
anodyne/blade-fluentui-icons
webx-ui/module-catalog-collections