Skip to content

Commit 325e9e2

Browse files
Update filtering.md (#336)
1 parent 22c9d90 commit 325e9e2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/docs/4.0/filtering/filtering.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,20 +137,20 @@ This will return all posts that doesn't contain `Some title` substring.
137137

138138
### Match closure
139139

140-
There may be situations when the filter you want to apply not necessarily is a database attributes. In your `booted`
140+
There may be situations when the filter you want to apply is not necessarily a database attribute. In your `booted`
141141
method you can add more filters for the `$match` where the key represents the field used as query param, and value
142142
should be a `Closure` which gets the request and current query `Builder`:
143143

144144
```php
145145
// UserRepository
146-
protected static function booted()
146+
protected static function booted()
147147
{
148148
static::$match['active'] => function ($request, $query) {
149149
if ($request->boolean('active')) {
150150
$query->whereNotNull('email_verified_at');
151151
} else {
152152
$query->whereNull('email_verified_at');
153-
}
153+
}
154154
}
155155
}
156156
```

0 commit comments

Comments
 (0)