you can install the library using composer
composer require higrow/raql-php
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();
}
}