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

Fix casts on initialization of HasTranslation #486

Merged
merged 8 commits into from
Feb 3, 2025
Merged

Conversation

thaqebon
Copy link
Contributor

Related Issue

Closes #485

Problem

When merging translatable casts during initialization, the getCasts() method adds id to the casts array prematurely.

Changes

To resolve this, we avoid using getCasts() and directly utilize the $casts property to merge translatable attributes.

@rcerljenko rcerljenko mentioned this pull request Feb 1, 2025
@freekmurze freekmurze merged commit 6150f6d into spatie:main Feb 3, 2025
19 checks passed
@freekmurze
Copy link
Member

Thank you!

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.

Issue with casts
2 participants