All notable changes to QueryFilter will be documented in this file.
- Manual Data Injection: Filters can now be used outside HTTP request contexts (Jobs, Commands, Tests)
- Added optional constructor parameter to inject data manually:
new StatusFilter(['status' => 'active']) - Filters automatically detect data source (manual data or HTTP request)
- Full backward compatibility - existing code works without changes
- Added optional constructor parameter to inject data manually:
- Comprehensive Documentation: Added "Using Filters Outside HTTP Requests" section with examples:
- Queue Jobs examples
- Console Commands examples
- Unit Tests examples
- Scheduled Tasks examples
- Mixed usage (HTTP + Manual data)
- Enhanced
Filterclass with optional constructor for data injection - Added
getValueSource()helper method for clean value retrieval - Updated
getValue()andhandle()methods to support both HTTP and manual data sources - Improved documentation with real-world use cases
- Constructor accepts optional
?array $data = nullparameter - Manual data takes precedence over HTTP request parameters
- Filter name must match array key when using manual data injection
- Zero breaking changes - 100% backward compatible
- Array Support in
getValue()Method: ThegetValue()method now accepts an optional boolean parameter$asArray(default:false) to automatically convert values to arrays- Supports comma-separated values:
?status=active,pending,completed - Supports array query parameters:
?status[]=active&status[]=pending - Automatic whitespace trimming for comma-separated values
- Backward compatible - default behavior remains unchanged
- Supports comma-separated values:
- Comprehensive Documentation: Complete rewrite of README.md with detailed examples and best practices
- Added "Working with Arrays" section with real-world examples
- Added "Advanced Usage" section with practical filter implementations
- Added "Best Practices" section for developers
- Added Table of Contents for easier navigation
- Improved code examples throughout
- Enhanced
getValue()return type fromstringtostring|arraywhen using array mode - Improved documentation structure with better organization and clearer examples
getValue()now intelligently detects array inputs from query parameters- Automatic conversion between comma-separated strings and arrays
- Native array parameter support (e.g.,
?param[]=value1¶m[]=value2)
- Initial stable release with core filtering functionality
whereLikemacro for searching across multiple columnswhereDateBetweenmacro for date range filtering- Pipeline-based filter system
- Model trait for direct filtering on Eloquent models
- Minor improvements and bug fixes
- Minor improvements and bug fixes
- Minor improvements and bug fixes
- Initial public release