ubitcorp / laravel-filter
It provides a Eloquent query builder that can be used with trait on any model for Laravel project
v1.8
2020-01-09 15:48 UTC
Requires
- php: ~7.1
- illuminate/support: 5.5.x|5.6.x|5.7.x|5.8.x|6.x
README
Laravel Filter
It provides a Eloquent Filter from request or an array. It can be used with trait on any model for Laravel project
Installation
Via Composer
composer require ubitcorp/laravel-filter
To change configuration file:
php artisan vendor:publish --provider="ubitcorp\Filter\ServiceProvider"
Usage
This package provides the filter trait that can be included any model. After that the functions below can be used:
//In Project Model (example) namespace App\Models; use Illuminate\Database\Eloquent\Model; use ubitcorp\Filter\Traits\Filter; class Project extends Model { use Filter; ... }
//In a Controller Project::with("customer")->filter()->paginate();