This is where your description should go. Take a look at contributing.md to see a to do list.
Via Composer
$ composer require fugazi-code/laravel-eloquent-filter
Please see the changelog for more information on what has changed recently.
$ php artisan make:filter UserFilter
<?php
namespace App\Http\Controllers\Filters;
use FugaziCode\Filter\Filter;
class UserFilter extends Filter
{
public function email($value)
{
$this->query->where('email', 'like', "%$value%");
}
public function permanent($value)
{
$this->query->whereHas('address', function($query) use ($value) {
$query->where('permanent', 'like', "%$value%");
});
}
}
Route::get('/', function () {
return User::query()->with(['address'])->filter(new UserFilter)->get();
});
Please see contributing.md for details and a todolist.
If you discover any security related issues, please email author@email.com instead of using the issue tracker.
MIT. Please see the license file for more information.