Last active
June 30, 2023 08:44
-
-
Save mohammad-fouladgar/23024b97f30b5cd053c2014262b71553 to your computer and use it in GitHub Desktop.
Customize-filter-namespace
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Fouladgar\EloquentBuilder\EloquentBuilder; | |
use App\Models\User; | |
$users = app(EloquentBuilder) | |
->setFilterNamespace('Domains\\User\\Filters') | |
->model(User::class) | |
->filters(request()->filters) | |
->thenApply() | |
->get(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment