Skip to content

Commit

Permalink
Merge pull request #2899 from kkiernan/5.2
Browse files Browse the repository at this point in the history
Typo fix
  • Loading branch information
taylorotwell authored Dec 8, 2016
2 parents 1f5975d + 1eefbd0 commit 6b0b057
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eloquent-relationships.md
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ If you want to count the number of results from a relationship without actually
echo $post->comments_count;
}

You may add retrieve the "counts" for multiple relations as well as add constraints to the queries:
You may retrieve the "counts" for multiple relations as well as add constraints to the queries:

$posts = Post::withCount(['votes', 'comments' => function ($query) {
$query->where('content', 'like', 'foo%');
Expand Down

0 comments on commit 6b0b057

Please sign in to comment.