ISSUE:
There are certain models that have relationships that I ALWAYS want loaded.
QUICK FIX:
In the model for the item, add a protected $with variable. See the following code:
Class MyModel extends Model { protected $with = ['relation']; }
In my case, I have a Location model, and the associated model is an Address model. Locations can have multiple addresses, and MUST have at least one address. In my case, the code would look like the following:
Class Location extends Model { protected $with = ['addresses']; }
Now, whenever I return a location object, it will automatically include the associated addresses with it.
Caveat?
This definitely isn't the solution for EVERY associated relationship - only the ones that are likely to be needed 80% or more of the time. Perhaps even a little less. However, the solution that Eager Loading provides outweighs most of the concerns that might come up from loading a small amount of resources every time.