© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
9 replies
Sayy

how to get data relationship from table text column in description

i just want to group like stock quantity then below its description from relationship can or not ?

Tables\Columns\TextColumn::make('productItems.stock')
                    ->numeric()
                    ->label('Stock Satuan')
                    ->formatStateUsing(function ($state) {
                        return str($state)->replace(',', ' |');
                    }),
Tables\Columns\TextColumn::make('productItems.satuan')
                    ->numeric()
                    ->label('Satuan')
                    ->formatStateUsing(function ($state) {
                        return str($state)->replace(',', ' | ');
                    }),
Tables\Columns\TextColumn::make('productItems.stock')
                    ->numeric()
                    ->label('Stock Satuan')
                    ->formatStateUsing(function ($state) {
                        return str($state)->replace(',', ' |');
                    }),
Tables\Columns\TextColumn::make('productItems.satuan')
                    ->numeric()
                    ->label('Satuan')
                    ->formatStateUsing(function ($state) {
                        return str($state)->replace(',', ' | ');
                    }),
image.png
Solution
solve with code like this :
->description(fn (Product $record): string => $record->productItems()->pluck('satuan')->implode(', '))
->description(fn (Product $record): string => $record->productItems()->pluck('satuan')->implode(', '))
Jump to solution
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 in a column from table sum from relationship
FilamentFFilament / ❓┊help
3y ago
JSON relationship column in table
FilamentFFilament / ❓┊help
14mo ago
Select Column relationship in Table.
FilamentFFilament / ❓┊help
2y ago
Need to get single data from relationship in table with where clause
FilamentFFilament / ❓┊help
3y ago