【发布时间】:2018-09-30 23:37:36
【问题描述】:
是否可以将中间表作为hasManyThrough() 的第二个参数传递?我只想使用表格,而不是模型。它应该是这样的:
return $this->hasManyThrough(
'App\Post',
'database.table', <- table instead of model
'country_id',
'user_id',
'id',
'id'
);
【问题讨论】:
标签: php laravel laravel-5 pivot-table has-many-through