Multicolor TextColumn Badge
Can I implement the colors in a TextColumn like this? - If so, how do I do that? - I have an array with the Spatie-Roles.

2 Replies
you need to add
TextColumn::make('status')
->badge()
->color(fn (string $state): string => match ($state) {
'draft' => 'gray',
'reviewing' => 'warning',
'published' => 'success',
'rejected' => 'danger',
})
to that text column