Cast the enum to a string

This commit is contained in:
Lance Pioch 2024-04-19 22:32:30 -04:00
parent 2bb1caf308
commit 3db6593b0e

View File

@ -623,7 +623,7 @@ class ServerResource extends Resource
'suspended' => 'tabler-heart-cancel',
default => 'tabler-heart-question',
})
->color(fn (string $state): string => match ($state) {
->color(fn ($state): string => match ($state) {
'running' => 'success',
'installing', 'restarting' => 'primary',
'paused', 'removing' => 'warning',