Example of Tucker-eric/eloquentfilter in LaraBug/larabug-app

File composer.json (link to Github)
{
  "require": {
    "php": "^8.0",
    //
    "tucker-eric/eloquentfilter": "^2.2"
  },
}
File app/Filters/ProjectFilter.php (link to Github)
use App\Models\Exception;
use EloquentFilter\ModelFilter;

class ProjectFilter extends ModelFilter
{
    public function search($value)
    {
        return $this->where('title', 'like', '%' . $value . '%');
    }

    public function hasOpenExceptions($value)
    {
        if (!$value) {
            return $this;
        }

        return $this->whereHas('exceptions', function ($query) {
            return $query->where('status', Exception::OPEN);
        });
    }
}
File app/Http/Controllers/ProjectController.php (link to Github)
use App\Models\Project;

class ProjectController extends Controller
{
    public function index()
    {
        $projects = auth()->user()
            ->projects()
            ->select('id', 'title', 'total_exceptions')
            ->withCount('unreadExceptions')
            ->filter(request()->only('search'))
            ->latest('last_error_at')
            ->latest('created_at')
            ->paginate();

        return inertia('Projects/Index', [
            'filters' => request()->only('search'),
            'projects' => $projects,
        ]);
    }
}

Additional resources on tucker-eric/eloquentfilter: