Skip to content

Instantly share code, notes, and snippets.

@mohammad-fouladgar
Last active June 30, 2023 08:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mohammad-fouladgar/23024b97f30b5cd053c2014262b71553 to your computer and use it in GitHub Desktop.
Save mohammad-fouladgar/23024b97f30b5cd053c2014262b71553 to your computer and use it in GitHub Desktop.
Customize-filter-namespace
<?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