Skip to content

Commit a4be458

Browse files
committed
formatting
1 parent c93d54e commit a4be458

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

eloquent-relationships.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -783,17 +783,17 @@ You may also specify an operator and count to further customize the query:
783783

784784
Nested `has` statements may also be constructed using "dot" notation. For example, you may retrieve all posts that have at least one comment and vote:
785785

786-
// Retrieve all posts that have at least one comment with votes...
786+
// Retrieve posts that have at least one comment with votes...
787787
$posts = App\Post::has('comments.votes')->get();
788788

789789
If you need even more power, you may use the `whereHas` and `orWhereHas` methods to put "where" conditions on your `has` queries. These methods allow you to add customized constraints to a relationship constraint, such as checking the content of a comment:
790790

791-
// Retrieve all posts with at least one comment containing words like foo%
791+
// Retrieve posts with at least one comment containing words like foo%
792792
$posts = App\Post::whereHas('comments', function ($query) {
793793
$query->where('content', 'like', 'foo%');
794794
})->get();
795-
796-
// Retrieve all posts with at least ten comments containing words like foo%
795+
796+
// Retrieve posts with at least ten comments containing words like foo%
797797
$posts = App\Post::whereHas('comments', function ($query) {
798798
$query->where('content', 'like', 'foo%');
799799
}, '>=', 10)->get();

0 commit comments

Comments
 (0)