2017 © Pedro Peláez
 

library lara-eye

image

railken/lara-eye

  • Sunday, July 1, 2018
  • by railken
  • Repository
  • 0 Watchers
  • 5 Stars
  • 1,828 Installations
  • PHP
  • 3 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 3556 % Grown

The README.md

Laravel Eye

Actions Status, (*1)

Filter your Illuminate\DataBase\Query\Builder using a structured query language. This can be pretty usefull when you're building an API and you don't want to waste hours of your time creating predefined filters that may change at any time., (*2)

Requirements

PHP 8.1 or later., (*3)

Usage


use Railken\LaraEye\Filter; use Railken\SQ\Exceptions\QuerySyntaxException; use App\Foo; // Instance of Illuminate\DataBase\Query\Builder $query = (new Foo())->newQuery()->getQuery(); $str_filter = "x > 5 or y < z"; $filter = new Filter("foo", ['id', 'x', 'y', 'z', 'created_at', 'updated_at']); try { $filter->build($query, $str_filter); } catch (QuerySyntaxException $e) { // handle syntax error }

Syntax here, (*4)

Composer

You can install it via Composer by typing the following command:, (*5)

composer require railken/lara-eye

Demo

demo, (*6)

License

Open-source software licensed under the MIT license., (*7)

The Versions