F
Filament4mo ago
Mike.

Color For multiple badge

This data is displayed multiple, and for that reason this data is safe and appears, it only takes 1 hex_colorcode so all of them only use the same 1 color, even though I want each data to appear with the appropriate color code i have this code ```TextEntry::make('labels.name') ->label('Labels') ->placeholder('-') ->color(function ($record) { $color = $record->labels->first( fn ($label) => !empty($label>hex_color_code))?->hex_color_code; return $color ? Color::hex($color) : null; })```
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?