I am working on this project where I use the Fluent Query Builder and I am trying to recreate the same output from the eloquent relationship eager loading,
User::with('roles')->get() for example, with join statements.
As a result I had duplicate rows for obvious reasons. I had a list of repeating email addresses with multiple role names for a many to many relationship.
My question is: Do I have to manually structure the objects where I have a nested object(s) for the relationships?
Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.