File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ return [
6464
6565## Basic Usage
6666
67- You can filter Eloquent models directly using the ` filter() ` scope.
67+ You can filter Eloquent models directly using the ` filter() ` scope. You can use all laravel
6868
6969``` php
7070use App\Models\User;
@@ -101,6 +101,24 @@ use App\Models\User;
101101
102102$users = User::filter(request())->paginate(); // Supports per_page from request or config
103103```
104+ ---
105+
106+ ### Using Laravel Query Methods
107+
108+ After applying filters with the package, you can continue to use all standard Laravel query builder and Eloquent methods. For example:
109+
110+ ``` php
111+ $users = User::filter($filters)->get();
112+ $users = User::filter($filters)->paginate(15);
113+ $users = User::filter($filters)->simplePaginate(10);
114+ $user = User::filter($filters)->first();
115+ ```
116+ ->get() → retrieves all matching records.
117+ ->paginate() → retrieves paginated results with page links.
118+ ->simplePaginate() → retrieves simpler pagination without total count.
119+ ->first() → retrieves the first matching record.
120+
121+ This allows you to combine filtering with any Laravel query workflow seamlessly.
104122
105123---
106124
You can’t perform that action at this time.
0 commit comments