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

[9.x] Fixes for model:show when attribute default is an enum #43370

Merged
merged 2 commits into from
Jul 22, 2022

Conversation

jessarcher
Copy link
Member

This PR tweaks the fix from #43360 to also apply the fix to the JSON output, and to display the value rather than the name for a BackedEnum.

@@ -413,11 +414,17 @@ protected function getColumnType($column)
*
* @param \Doctrine\DBAL\Schema\Column $column
* @param \Illuminate\Database\Eloquent\Model $model
* @return string|null
* @return mixed|null
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mixed can never be combined with other types:

Suggested change
* @return mixed|null
* @return mixed

@taylorotwell taylorotwell merged commit 5d34d92 into 9.x Jul 22, 2022
@taylorotwell taylorotwell deleted the model-show-enum-default branch July 22, 2022 14:52
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.

3 participants