i want to call AppointmentTime but for some reason i get the path inside bot the label can anyone tell me what i did wrong
#enum only showing the path
34 messages · Page 1 of 1 (latest)
What you did is pass one option with the name of your class.
You should use ->enum()
now it give me nothing inside
can you try ->options(AppointmentTime::class)
and of i do it like this->options([AppointmentTime::class])
namespace App\Enums;
use Filament\Support\Contracts\HasLabel;
enum AppointmentTime: string implements HasLabel {
case TIME_9 = '09:00';
case TIME_10 = '10:00';
case TIME_11 = '11:00';
case TIME_12 = '12:00';
case TIME_13 = '13:00';
public function getLabel(): ?string
{
return match ($this) {
self::TIME_9 => '9:00',
self::TIME_10 => '10:00',
self::TIME_11 => '11:00',
self::TIME_12 => '12:00',
self::TIME_13 => '13:00',
};
}
}
What version are you using?
weird, I used it like this only and never run a problem..
i dont know one is working and the other one is not working
Wait? Isnt't this the exact one you just sent the error for?!
this one is status
It's a different Enum
same
What's the difference between those two? 😅
Check the name of the first class. You have a typo
Your file name is AppointementTime.php notice extra e in class name, I wonder how you import correctly in your casts
yeah i change the name of the file and it is working now thank you
->options(AppointmentTime::class) not ->options([AppointmentTime::class])
Good morning. We already solved this issue 😅
You can go on. Nothing to see here.
i didnt see where that bit was fixed lol