1. Go to this page and download the library: Download duc_cnzj/model-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/ */
duc_cnzj / model-filter example snippets
# User.php
class User extends Model
{
use HasFilter;
}
User::filter($request)->get();
or
User::filter(new UserFilter($request))->get();
or
User::filter(['name' => 'duc'])->get();