Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andersao/laravel-fiql-parser
Laravel FIQL Parser
https://github.com/andersao/laravel-fiql-parser
fiql fiql-parser laravel php
Last synced: about 2 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 (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-10-14T22:03:18.000Z (about 3 years ago)
- Last Synced: 2024-08-21T23:17:21.482Z (4 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
[![Latest Stable Version](http://poser.pugx.org/prettus/laravel-fiql-parser/v)](https://packagist.org/packages/prettus/laravel-fiql-parser)
[![Total Downloads](http://poser.pugx.org/prettus/laravel-fiql-parser/downloads)](https://packagist.org/packages/prettus/laravel-fiql-parser)
[![Latest Unstable Version](http://poser.pugx.org/prettus/laravel-fiql-parser/v/unstable)](https://packagist.org/packages/prettus/laravel-fiql-parser)
[![License](http://poser.pugx.org/prettus/laravel-fiql-parser/license)](https://packagist.org/packages/prettus/laravel-fiql-parser)
[![Maintainability](https://api.codeclimate.com/v1/badges/cbff811f623998298475/maintainability)](https://codeclimate.com/github/andersao/laravel-fiql-parser/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/cbff811f623998298475/test_coverage)](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` = ?
```