Laravel Tip

Written on March 1, 2016

If you want a model to always eager load a relationship, you can add protected $with = [‘relation’]; to your Eloquent class.

Tip courtesy of @laracasts.