I have privot table that have position_id and provider_id. How delete duplicate values that table can look like second table. I would like solve this task by eloquent. First table display next code:
MyTable::with('provider')->with('position')->orderBy('position_id')->get()
position_id provider_id
7 1
7 2
7 3
9 5
9 6
10 7
position_id provider_id
7 1
2
3
9 5
6
10 7