freesgen/querify

Build db query from params

dev-master 2021-01-07 07:10 UTC

This package is auto-updated.

Last update: 2024-11-05 05:08:42 UTC


README

Php version of https://github.com/jesusantguerrero/adonisjs-querify

Provide a Trait to make enriched api get sql search from query string in url in Laravel

Queryfy calls params

search

?search=jesus

filter

/endpoint?filter[fieldName]=value&filter[fieldName]=value

like

/endpoint?filter[Name]=%value%

greater than

/endpoint?filter[field]=>value

minor than

/endpoint?filter[field]=<value

between

/endpoint?filter[field]=value1~value2

not

/endpoint?filter[field]=~value2

null

/endpoint?filter[field]=$value2

Sort