Show multiple column data in a single table column.

I am trying to show 3 columns data in single Table column. But it show only blank.
Tables\Columns\TextColumn::make('properties')->label('Properties')
->formatStateUsing(function($record){
return "Length: {$record->length} \n Frames: {$record->frames} \n Size: {$record->size}M";
})->wrap(),
Tables\Columns\TextColumn::make('properties')->label('Properties')
->formatStateUsing(function($record){
return "Length: {$record->length} \n Frames: {$record->frames} \n Size: {$record->size}M";
})->wrap(),
Please suggest.
Solution:
Ensure the "properties", is a valid property and is returning something otherwise (to my knowledge) it wont trigger formatStateUsing.
Jump to solution
3 Replies
Solution
oxodesign
oxodesign5mo ago
Ensure the "properties", is a valid property and is returning something otherwise (to my knowledge) it wont trigger formatStateUsing.
awcodes
awcodes5mo ago
Is “properties” an actual attribute on the model?
Sujay Barma
Sujay BarmaOP5mo ago
no Ok So I have to use attribute name. Thanks @oxodesign and @awcodes for the hint.

Did you find this page helpful?