Skip to content
This repository was archived by the owner on Jul 31, 2018. It is now read-only.

Commit 1f1351f

Browse files
committed
readme improvement
1 parent 2c73d99 commit 1f1351f

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,24 @@ To search using an extra index, use the following code:
393393
Book::search('foo bar', ['index' => 'contacts_private']);
394394
```
395395

396+
## Eloquent compatibility
397+
398+
Doing :
399+
400+
```
401+
Ad::where('id', $id)->update($attributes);
402+
```
403+
404+
will not trigger anything in the model (so no update will happen in Algolia). This is because this is not an Eloquent call,
405+
it is just a convenient way to generate the query hidden behind the model
406+
407+
To make this query work with Algolia you need to do it like that:
408+
409+
```
410+
Ad::find($id)->update($attributes);
411+
```
412+
413+
396414
## Compatibility
397415

398416
Compatible with 5.x applications

0 commit comments

Comments
 (0)