Laravel eloquent query BelngsToMany pivot table
I am trying to write an Eloquent query for a BelongsToMany relationship and where the results return only one distinct result based on the pivot table. See below for example. Installer: Id Name 1 Installer 1 2 Installer 2 State:…