1. Go to this page and download the library: Download eth0/laravel-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/ */
eth0 / laravel-filters example snippets
artisan make:filter ModelFilter
namespace App\Filters\ModelFilter;
use Mukja\LaravelFilters\FiltersAbstract;
class ModelFilter extends FiltersAbstract
{
protected $filters = [
//
];
}
namespace App\Filters\ModelFilter;
use Mukja\LaravelFilters\FiltersAbstract;
use App\Filters\Model\{
ModelStatusFilter,
ModelCreatedAtFilter
};
class ModelFilter extends FiltersAbstract
{
protected $filters = [
'status' => ModelStatusFilter::class,
'created_at' => ModelCreatedAtFilter::class
];
}