如果主表中包含枢轴数据,我希望获取所有数据。示例ID Name2 sample 2--------the pivot table **product_user**3 user3-------------> is in the pivot table **product_user**product_id
我想用Eloquent查询pivot模型关系。我有我的用户模型: class User extends Authenticatable public function preferences(): BelongsToMany ->using(UserNotificationPreference::class) //Custom Pivotmodel