Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[10.x] Get value attribute when default value is an enum #48452

Conversation

squiaios
Copy link
Contributor

In migration, you can add a default enum case, without adding the value attribute (->value)

@calebdw
Copy link
Contributor

calebdw commented Sep 19, 2023

Personally not a fan of defaults in the database (other than perhaps null). You can define an $attributes property on the model that can accept the enum case directly

@crynobone crynobone changed the title feat: get value attribute when default value is an enum [10.x] Get value attribute when default value is an enum Sep 19, 2023
@taylorotwell taylorotwell merged commit c01443d into laravel:10.x Sep 19, 2023
20 checks passed
@squiaios squiaios deleted the get-value-attribute-when-default-value-is-an-enum branch March 27, 2024 23:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants