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

[7.x] Streamline ease of use with relation subquery #33180

Merged
merged 1 commit into from
Jun 11, 2020

Conversation

moshe-autoleadstar
Copy link
Contributor

Since the Relation forwards calls to the query builder object, it can be turned into a subquery just like a regular query builder object

Before:

$post->whereIn('headline', $post->comments()->select('text')->getQuery())

After:

$post->whereIn('headline', $post->comments()->select('text'))

Since the Relation forwards calls to the query builder object, it can be turned into a subquery just like a regular query builder object
@driesvints driesvints changed the title Streamline ease of use with relation subquery [7.x] Streamline ease of use with relation subquery Jun 11, 2020
@taylorotwell taylorotwell merged commit 771dfb5 into laravel:7.x Jun 11, 2020
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