thedevdojo / voyager

Voyager - The Missing Laravel Admin
https://voyager.devdojo.com
MIT License
11.72k stars 2.67k forks source link

Select Dropdown using enum->value instead of enum? #5855

Closed cyyeoh closed 2 weeks ago

cyyeoh commented 2 months ago

Laravel version

10.10

PHP version

8.1

Voyager version

dev-1.6-l10

Database

MYSQL

Description

When updating my db using admin panel from select dropdown, I discovered that Voyager is using the values of enum instead of enum itself, this causes an issue in my code when performing checking.

Steps to reproduce

in code XEnum case APPROVED = "APPROVED";

in BREAD selectdropdown optional details "APPROVED": "APPROVED"

Expected behavior

Voyager able to use enum in BREAD instead of just taking the value of enum

Screenshots

No response

Additional context

No response