PHP code example of laratoolbox / eloquent-filters

1. Go to this page and download the library: Download laratoolbox/eloquent-filters 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/ */

    

laratoolbox / eloquent-filters example snippets


use \LaraToolbox\EloquentFilters\HasFilter;

MyEloquentModel::filter( new UserFilter() )->get();

// or you can give request instance into filter.

$request = request();
MyEloquentModel::filter( new UserFilter($request) )->get();