Download the PHP package pawsmedz/laravel-json-filter without Composer
On this page you can find all versions of the php package pawsmedz/laravel-json-filter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download pawsmedz/laravel-json-filter
More information about pawsmedz/laravel-json-filter
Files in pawsmedz/laravel-json-filter
Package laravel-json-filter
Short Description Dynamic JSON filtering for Eloquent Builder with Laravel 9-12 & PHP 8.1-8.4 support (MySQL, PostgreSQL & SQLite).
License MIT
Informations about the package laravel-json-filter
Laravel JSON Filter
A Laravel package that provides fluent, database-agnostic JSON querying macros for Eloquent and Query Builder. Seamlessly work with JSON columns across MySQL, PostgreSQL, and SQLite with a consistent, expressive API.
Features
- ๐ Database Agnostic: Works seamlessly with MySQL, PostgreSQL, and SQLite
- ๐ฏ Fluent API: Clean, expressive syntax for JSON queries
- ๐ Multiple Macros: Filter, select, order, search, and check existence
- ๐ง Easy Integration: Auto-discovery service provider
- ๐งช Well Tested: Comprehensive test suite
- ๐ฆ Laravel Compatible: Supports Laravel 9.x, 10.x, 11.x, and 12.x
Installation
You can install the package via Composer:
The package will automatically register its service provider via Laravel's auto-discovery feature.
Usage
Basic JSON Filtering
Filter records based on JSON field values:
JSON Where In
Filter records where JSON field matches any value in an array:
JSON Contains (Search)
Search for records where JSON field contains a specific substring:
JSON Exists
Check if a JSON path exists in records:
JSON Select
Select specific JSON fields as columns:
JSON Order By
Order results by JSON field values:
Combining Multiple Macros
Chain multiple JSON operations for complex queries:
Database Support
The package automatically detects your database driver and uses the appropriate JSON syntax:
MySQL
PostgreSQL
SQLite
Falls back to basic column operations for compatibility.
Requirements
- PHP 8.1 or higher
- Laravel 9.x, 10.x, 11.x, or 12.x
- MySQL, PostgreSQL, or SQLite database
Testing
Run the test suite:
Run tests with coverage:
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Rayvand Jasper Valle Medrano
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-json-filter with dependencies
illuminate/database Version ^9.0|^10.0|^11.0|^12.0
illuminate/support Version ^9.0|^10.0|^11.0|^12.0