I have a statement like this:
App\User::with('client')->find(2)->makeHidden('client.phone_no');
I want to hide certain columns from a relation, but I can't do that with makeHidden()
, because it only takes the arguments for the Model
not the relation.
How can I hide some columns from the relation?