Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add __call() method to AlgoliaEngine #384

Merged
merged 2 commits into from
Sep 11, 2019
Merged

Conversation

tillkruss
Copy link
Contributor

@tillkruss tillkruss commented Sep 10, 2019

This allows calling methods like multipleQueries() on the Algolia search client easily.

I'm not sure if tests are needed for this. Please advise.

This PR allows calls like this:

User::searchableUsing()->multipleQueries();

// or

app(EngineManager::class)->engine()->multipleQueries($indices);

This allows calling the Algolia search client's methods like `multipleQueries()` easily.
@nunomaduro
Copy link
Member

The usage would be something like this, correct?

User::searchableUsing()->multipleQueries();

@tillkruss
Copy link
Contributor Author

Correct, I updated the description.

@nunomaduro
Copy link
Member

Alright, I do think that's a useful feature. @taylorotwell @driesvints Willing to add this?

@tillkruss If they agree, do you mind of adding some tests?

@tillkruss
Copy link
Contributor Author

@nunomaduro: I wouldn't know what to test TBH without linking the tests to Algolia's SearchClient itself, which might change and I'd say it's up to the developer to test their call themselves, not this package. Do you have a suggestion?

@taylorotwell taylorotwell merged commit a414c9a into laravel:7.0 Sep 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants