How might I eager load category data in a plugin? I can't seem to figure out why I can't access a category in this way:
locationOffers is a matrix block name, category is the handle of a related category field inside of the matrix block
// this adds an empty category array to each related offer
$relatedOffers = $entry->locationOffers->with(['category'])->all();
print_R($relatedOffers->category); // is empty
// this regular way works, where I can access category->title, and more,
// but is not eager loaded
$relatedOffers = $entry->locationOffers->all();