Skip to content

Commit

Permalink
Fixed code snippet
Browse files Browse the repository at this point in the history
  • Loading branch information
ramonrietdijk committed Oct 17, 2024
1 parent 5c0392e commit 2c30217
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,11 +280,11 @@ Full list of ElasticSearch terms is in `vendor/handcraftedinthealps/elasticsearc
You can do it with `MixedSearch` class, just pass indices names separated by commas to the `within` method.
```php
MixedSearch::search('title:Barcelona or to:Barcelona')
within(implode(',', [
->within(implode(',', [
(new Ticket())->searchableAs(),
(new Book())->searchableAs(),
]))
->get();
->get();
```
In this example you will get collection of `Ticket` and `Book` models where ticket's arrival city or
book title is `Barcelona`
Expand Down

0 comments on commit 2c30217

Please sign in to comment.