© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
5 replies
Daniel Reales

How to show in a column from table sum from relationship

I have this:

Tables\Columns\TextColumn::make('order_items_sum_price')
                    ->sum('orderItems', 'price')->money('eur')->sortable()->label('Precio Total')

Tables\Columns\TextColumn::make('order_items_sum_price')
                    ->sum('orderItems', 'price')->money('eur')->sortable()->label('Precio Total')


But every orderItem has a column with amount.
I need to multiply the quantity by its price and in turn make the total sum. How could I do it?
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

How to show Count relationship in table?
FilamentFFilament / ❓┊help
3y ago
How to Sum relationship column with cast field
FilamentFFilament / ❓┊help
15mo ago
JSON relationship column in table
FilamentFFilament / ❓┊help
14mo ago
Select Column relationship in Table.
FilamentFFilament / ❓┊help
2y ago