Skip to content

Commit

Permalink
Fixing examples in doc blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Jun 5, 2015
1 parent f57ebd3 commit c417baf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ORM/Query.php
Expand Up @@ -350,7 +350,7 @@ public function matching($assoc, callable $builder = null)
* // Get the count of articles per user
* $usersQuery
* ->select(['total_articles' => $query->func()->count('Articles.id')])
* ->leftJoin('Articles')
* ->leftJoinWith('Articles')
* ->group(['Users.id'])
* ->autoFields(true);
* ```
Expand All @@ -361,7 +361,7 @@ public function matching($assoc, callable $builder = null)
* // Get the count of articles per user with at least 5 votes
* $usersQuery
* ->select(['total_articles' => $query->func()->count('Articles.id')])
* ->leftJoin('Articles', function ($q) {
* ->leftJoinWith('Articles', function ($q) {
* return $q->where(['Articles.votes >=' => 5]);
* })
* ->group(['Users.id'])
Expand All @@ -385,7 +385,7 @@ public function matching($assoc, callable $builder = null)
* // Total comments in articles by 'markstory'
* $query
* ->select(['total_comments' => $query->func()->count('Comments.id')])
* ->leftJoin('Comments.Users', function ($q) {
* ->leftJoinWith('Comments.Users', function ($q) {
* return $q->where(['username' => 'markstory']);
* )
* ->group(['Users.id']);
Expand Down

0 comments on commit c417baf

Please sign in to comment.