1. Go to this page and download the library: Download accelade/query-builder library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
accelade / query-builder example snippets
use Accelade\QueryBuilder\QueryBuilder;
use App\Models\User;
// Create a query builder from a model
$users = QueryBuilder::for(User::class)
->allowedSearch(['name', 'email'])
->allowedFilters(['status', 'role'])
->allowedSorts(['name', 'created_at'])
->defaultSort('-created_at')
->paginate();