Skip to content

Commit 17101c2

Browse files
committed
README updates
1 parent f5a1bdb commit 17101c2

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff 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
7070
use 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

0 commit comments

Comments
 (0)