Skip to content

Latest commit

 

History

History
36 lines (28 loc) · 544 Bytes

README.md

File metadata and controls

36 lines (28 loc) · 544 Bytes

RAQL.PHP

Installation

you can install the library using composer

composer require higrow/raql-php

Usage

Laravel/Eloquent

Create a model that uses RAQLTrait

use RAQL\PHP\Eloquent\RAQLTrait;

class MyModel extends Model
{
  use RAQLTrait;
  ...
}

Call the .raql($query) Query Builder extension method

class Controller extends BaseController
{
  function queryMyModel()
  {
    $query = "(field1 like 'name' or field1 = 'mario') and field2 >=10";
    return MyModel::raql($query)->get();
  }
}