I'm currently scratching my head with this one.

**What I have.**

`$entries = Meta::whereIn('settlement_id', [1])->groupBy('client_id')->get();`

`Meta::model()` has a hasOne relation with other tables, in my example with a `Sport` table. With one attribute in my array I can achieve what I want.

So in a loop I have my field available `$entry->Sport->amount` this works perfectly.

**What I need.**

`$entries = Meta::whereIn('settlement_id', [1,2,3])->groupBy('client_id')->get();`

Now when I expand my array with multiple id's, I expect that `$entry->Sport->amount` returns the sum of all id's. But it doesn't.

I can't figure out what i'm doing wrong.

All help is appreciated.