File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -185,6 +185,23 @@ class PostController extends Controller
185
185
}
186
186
```
187
187
188
+ ## Adding via Query
189
+ The ` searchable() ` method will chunk the results of the query and add the records to your search index.
190
+
191
+ $post = Post::find(1);
192
+
193
+ // You may also add record via collection...
194
+ $post->searchable();
195
+
196
+ // OR
197
+
198
+ $posts = Post::where('year', '>', '2018')->get();
199
+
200
+ // You may also add records via collections...
201
+ $posts->searchable();
202
+
203
+ When using constraints apply it after the constraints are added to the query, as seen in the above example.
204
+
188
205
## OrderBy
189
206
An ` orderBy() ` statement can now be applied to the search query similar to the ` where() ` statement.
190
207
You can’t perform that action at this time.
0 commit comments