xtwoend/query-string

AddOn method sorts & filter on request

dev-master 2021-02-11 00:19 UTC

This package is auto-updated.

Last update: 2024-11-11 08:14:38 UTC


README

Installation

composer require xtwoend/query-string

add config in bin/bootstrap.php

$app->configure('query-builder');
$app->register(\Xtwoend\QueryString\ConfigProvider::class);

Usage


\\ ?sort[id]=1&sort[name]=0
$request->sorts();
\\ result ['id' => 'desc', 'name'=> 'asc']

\\ ?q=keyword
$request->filter();