Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions src/Column.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,25 @@ public static function make(?string $name = null): static
return $static;
}

public static function enum(BackedEnum $enum): static
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BackedEnum is referenced without being imported or fully-qualified. Inside the Relaticle\Flowforge namespace this will resolve to Relaticle\Flowforge\BackedEnum and cause an autoload/Class not found error. Import BackedEnum (e.g. use BackedEnum;) or change the typehint to \BackedEnum.

Copilot uses AI. Check for mistakes.
{
$column = static::make($enum->value);

if ($enum instanceof \Filament\Support\Contracts\HasLabel) {
$column->label($enum->getLabel());
}

if ($enum instanceof \Filament\Support\Contracts\HasColor) {
$column->color($enum->getColor());
}

if ($enum instanceof \Filament\Support\Contracts\HasIcon) {
$column->icon($enum->getIcon());
}

return $column;
}

public static function getDefaultName(): ?string
{
return null;
Expand Down