Skip to content

Commit

Permalink
make kanban cases of the enum trait dynamic
Browse files Browse the repository at this point in the history
  • Loading branch information
mokhosh committed Nov 20, 2023
1 parent 0c03589 commit ecb5a2e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Concerns/IsKanbanStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ trait IsKanbanStatus
{
public static function statuses(): Collection
{
return collect(static::cases())
return collect(static::kanbanCases())
->map(function (self $item) {
return [
'id' => $item->getId(),
Expand All @@ -17,6 +17,11 @@ public static function statuses(): Collection
});
}

public static function kanbanCases(): array
{
return static::cases();
}

public function getId(): string
{
return $this->name;
Expand Down

0 comments on commit ecb5a2e

Please sign in to comment.