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
oxodesign3w ago
Ensure the "properties", is a valid property and is returning something otherwise (to my knowledge) it wont trigger formatStateUsing.
awcodes
awcodes3w ago
Is “properties” an actual attribute on the model?
Sujay Barma
Sujay Barma3w ago
no Ok So I have to use attribute name. Thanks @oxodesign and @awcodes for the hint.
Want results from more Discord servers?
Add your server