Skip to content

Instantly share code, notes, and snippets.

@CodeWithDennis
Created August 24, 2025 17:24
Show Gist options
  • Select an option

  • Save CodeWithDennis/2c4a803cd9b97826d38dac51efabd107 to your computer and use it in GitHub Desktop.

Select an option

Save CodeWithDennis/2c4a803cd9b97826d38dac51efabd107 to your computer and use it in GitHub Desktop.
Enum option example with badge
public function getLabel(): string|Htmlable|null
{
return match ($this) {
self::PENDING => new HtmlString(Blade::render('<x-filament::badge color="info">Pending</x-filament::badge>')),
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment