Skip to content

Commit 3cb9aca

Browse files
authored
Update README.md
1 parent 600c283 commit 3cb9aca

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ class PostController extends Controller
202202
## Adding via Query
203203
The `searchable()` method will chunk the results of the query and add the records to your search index.
204204

205+
```php
205206
$post = Post::find(1);
206207

207208
// You may also add record via collection...
@@ -213,6 +214,7 @@ $posts = Post::where('year', '>', '2018')->get();
213214

214215
// You may also add records via collections...
215216
$posts->searchable();
217+
```
216218

217219
When using constraints apply it after the constraints are added to the query, as seen in the above example.
218220

0 commit comments

Comments
 (0)