Skip to content

Commit 3b96705

Browse files
committed
update readme2
1 parent 60c67be commit 3b96705

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,12 @@ If you want to get results from a relationship without actually loading them and
3131
```php
3232
$invoices = Invoice::withSum('items:price,price2')->get();
3333
echo $invoices[0]->items_price_sum;
34+
3435
$invoices = Invoice::withMin('items:price,price2')->get();
3536
echo $invoices[0]->items_price_min;
3637
```
3738
The following methods apply to all methods.!!!
39+
3840
You may add the "sum" for multiple relations as well as add constraints to the queries:
3941
```php
4042
use Illuminate\Database\Eloquent\Builder;

0 commit comments

Comments
 (0)