https://github.com/andersao/laravel-fiql-parser
Laravel FIQL Parser
https://github.com/andersao/laravel-fiql-parser
fiql fiql-parser laravel php
Last synced: 4 months ago
JSON representation
Laravel FIQL Parser
- Host: GitHub
- URL: https://github.com/andersao/laravel-fiql-parser
- Owner: andersao
- Created: 2021-10-14T03:44:14.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-10-14T22:03:18.000Z (over 3 years ago)
- Last Synced: 2025-02-24T08:07:12.979Z (5 months ago)
- Topics: fiql, fiql-parser, laravel, php
- Language: PHP
- Homepage:
- Size: 50.8 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Laravel FIQL Parser
[](https://packagist.org/packages/prettus/laravel-fiql-parser)
[](https://packagist.org/packages/prettus/laravel-fiql-parser)
[](https://packagist.org/packages/prettus/laravel-fiql-parser)
[](https://packagist.org/packages/prettus/laravel-fiql-parser)
[](https://codeclimate.com/github/andersao/laravel-fiql-parser/maintainability)
[](https://codeclimate.com/github/andersao/laravel-fiql-parser/test_coverage)## Installation
```bash
composer require prettus/laravel-fiql-parser:dev-main
```## Features
### Using Query Builder
```php
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
```php
use Illuminate\Database\Eloquent\Model;class User extends Model
{
protected $table = 'users';
}```
```php
$query = User::query()->filter('last_name==foo');
print_r($query->toSql());
// select * from `users` where `last_name` = ?
```