1. Go to this page and download the library: Download alifcoder/query-filter 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/ */
alifcoder / query-filter example snippets
// app/Filters/StatusFilter.php
use Alif\QueryFilter\Contracts\Filter;
class StatusFilter implements Filter
{
public function handle(Builder $query, $value, Closure $next)
{
if ($value) {
$query->where('status', $value);
}
return $next($query);
}
}