`->with('category')
->with(['campaignData'=>function($query){
$query->addSelect(['id','partners','customers']);
}])
->with('type')`
I wanted to retrieve just 'partners' and 'customers' but to retrieve only those two, selection of foreign key also required
via lakmalsathyajith