Many to many relationship between users and reports. Any user can have many reports. I want to sort the reports for a user by the created_at column. How would i finish this below to do that??
$x = User::find(1)->report.....
For anyone wondering, you add parenthesis to the end of a relationship method when you are chaining on a function like orderBy() you leave it off when you just want the collection. IF you need to alter the returned collection by sorting or something you would add parenthesis because you are in fact ADDING(CHAINING) another method behind the relationship.