質問編集履歴
1
追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -58,4 +58,6 @@
|
|
58
58
|
`Sales::find(id)->products()`
|
59
59
|
|
60
60
|
ただ、salesの期間を絞り込んでsales_productの商品ごとの合計を取得する方法がわかりません。
|
61
|
+
やりたいのは以下のように複数のsalesにあるsales_productの集計です。
|
62
|
+
`Sales::whereBetween('date', '2020-xx-xx xx:xx:xx', '2021-xx-xx xx:xx:xx')->products()`
|
61
63
|
よろしくお願いします。
|