prettus / laravel-fiql-parser
Laravel FIQL Parser
dev-main
2021-10-14 22:03 UTC
Requires
- illuminate/support: ^8.64
- prettus/php-fiql-parser: dev-main
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.2
- orchestra/testbench: ^6.21
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2024-11-15 04:47:50 UTC
README
Installation
composer require prettus/laravel-fiql-parser:dev-main
Features
Using Query Builder
use Illuminate\Support\Facades\DB; $query = DB::table('users')->filter('last_name==foo'); print_r($query->toSql()); // select * from `users` where `last_name` = ?
Using Eloquent model
use Illuminate\Database\Eloquent\Model; class User extends Model { protected $table = 'users'; }
$query = User::query()->filter('last_name==foo'); print_r($query->toSql()); // select * from `users` where `last_name` = ?