How to Sum relationship column with cast field

Hi Im Using PGSQL
And I got Error On Image

And this is my code

TextColumn::make('pengeluarans_sum_debit')
                    ->label('Total Pemasukan')
                    ->sum('pengeluarans', 'debit')
                    ->money('IDR'),


Thx U All
image.png
Was this page helpful?