Skip to content

Instantly share code, notes, and snippets.

@pntrivedy
Last active August 5, 2024 11:46
Show Gist options
  • Save pntrivedy/3af076d926dc2a9a95ee2d2041c4cdf0 to your computer and use it in GitHub Desktop.
Save pntrivedy/3af076d926dc2a9a95ee2d2041c4cdf0 to your computer and use it in GitHub Desktop.
filament badge colors
label('Type')->searchable()->sortable() ->badge() ->color(function (string $state): string { return match ($state) { 'credit' => 'warning', // value => color-name }; }) ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment