模型结构如下如何用Laravel5.3的withCount()方法加载教程模型中的视频数量(WithCount)Tutorial::withCount('chapters')
->withCount('chapters.videos') // this gives error: Call to und
我有这个Warehouse → many to many → Product → has many → Sale 我的人际关系 warehouse.php public function products () {} product.php public function sales () {} 我想要获得每个仓库的销售额 我尝试过的