Skip to content

Commit b7254f9

Browse files
Improve docblock for with() method to clarify it adds to existing eag… (#54838)
* Improve docblock for with() method to clarify it adds to existing eager loads The previous docblock for the with() method wasn't entirely clear on whether it set and replaced the existing eager loading list or appended to it. I had to read the source code instead of just the docblock. This update clarifies that calling with() adds to the existing list rather than overwriting it. * Update Builder.php * Update Builder.php --------- Co-authored-by: Taylor Otwell <[email protected]>
1 parent a71794b commit b7254f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Illuminate/Database/Eloquent/Builder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1595,7 +1595,7 @@ protected function createNestedWhere($whereSlice, $boolean = 'and')
15951595
}
15961596

15971597
/**
1598-
* Set the relationships that should be eager loaded.
1598+
* Specify relationships that should be eager loaded.
15991599
*
16001600
* @param array<array-key, array|(\Closure(\Illuminate\Database\Eloquent\Relations\Relation<*,*,*>): mixed)|string>|string $relations
16011601
* @param (\Closure(\Illuminate\Database\Eloquent\Relations\Relation<*,*,*>): mixed)|string|null $callback

0 commit comments

Comments
 (0)