How to show only a single icon or boolean on an array column in table view
A record may have multiple files uploaded that are stored in DB column
attachments
attachments
as an array. In the table list I want to show a single icon if the record has any attachments at all. However, the code below shows a list of icons for each of the item of the array in the
attachments
attachments
column.
Tables\Columns\IconColumn::make('attachments')->icon('heroicon-o-photo'),// The same is with boolean, please see the attached screenshotTables\Columns\IconColumn::make('attachments')->boolean(),
Tables\Columns\IconColumn::make('attachments')->icon('heroicon-o-photo'),// The same is with boolean, please see the attached screenshotTables\Columns\IconColumn::make('attachments')->boolean(),