© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
13 replies
KeyMe

Listing multiple values for a relationship with another attribute

I have a vehicle relation manager table where i want to display every IMEI numbers associated with the vehicle. On top of that, I want to format the imei list to include its' type as below.
"0185701241241 (Device)
  015830914194 (Addon)
"0185701241241 (Device)
  015830914194 (Addon)

Current code, obviously doesnt work:
Tables\Columns\TextColumn::make('deviceimeis.imei')
                    ->formatStateUsing(function ($state, Vehicle $record) {
                        return $state . '(' . $record->DeviceImeis->type . ')';
                    })
                    ->label('IMEI')
                    ->listWithLineBreaks()
                    ->bulleted(),
Tables\Columns\TextColumn::make('deviceimeis.imei')
                    ->formatStateUsing(function ($state, Vehicle $record) {
                        return $state . '(' . $record->DeviceImeis->type . ')';
                    })
                    ->label('IMEI')
                    ->listWithLineBreaks()
                    ->bulleted(),
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

Listing multiple values in TextColumn with groupby a certain attribute
FilamentFFilament / ❓┊help
13mo ago
Listing with Pivot Attributes when Pivot attribute is an Accessor
FilamentFFilament / ❓┊help
3y ago
Enums for datalist attribute values
FilamentFFilament / ❓┊help
8mo ago
Filter by multiple Relationship attributes
FilamentFFilament / ❓┊help
3y ago