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

Adds default $query value on Searchable::search #309

Merged
merged 1 commit into from
Oct 4, 2018
Merged

Adds default $query value on Searchable::search #309

merged 1 commit into from
Oct 4, 2018

Conversation

nunomaduro
Copy link
Member

This Pull Request addresses the developer experience while interacting with the method Searchable::search - adding a default value to the $query param.

This can be useful if the developer just want an instance of the Builder::class:

Before:

$results = Thread::search('')->where(...)->get();

After:

$results = Thread::search()->where(...)->get();

@taylorotwell taylorotwell merged commit 739105f into laravel:5.0 Oct 4, 2018
@nunomaduro nunomaduro deleted the patch-1 branch October 4, 2018 13:40
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.

2 participants