laravie/query-filter
Laravie Query Filter adds a clean, reusable way to filter Eloquent queries from request input. Define filter classes and apply them to models to handle searching, sorting, and conditional constraints without cluttering controllers or repositories.
Testing facade improvements) may simplify test writing.LIKE on large datasets) could still degrade performance. No new performance-related features or warnings in the release notes.dd() enhancements) could help, but no package-specific changes are noted.booted() or register() in service providers, which may behave differently in Laravel 11?where() chains with the package’s filters.Testing facade, updated assertions) to streamline test writing.// Laravel 11-style test
public function test_filtered_query()
{
$response = $this->get('/users', ['filters' => ['status' => 'active']]);
$response->assertOk()->assertJsonStructure(['data' => [[
'id', 'name', 'status'
]]]);
}
spatie/laravel-query-builder or archtechx/boom.eq, gt, in).apply() method.dd(), handle()) to log and optimize slow queries.// Laravel 11 debugging
$query->toSql(); // Log the generated SQL
dd($query->getQuery()->bindings); // Inspect bindings
CONTRIBUTING.md file.Problem exceptions) to surface filter-related issues.Problem exceptions for consistent error responses.
// Example: Returning a Problem for invalid filters
return Problem::validation(
'Invalid filter input',
response: null,
status: '422',
detail: 'The provided filters are invalid.'
How can I help you explore Laravel packages today?