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

Add support for Arrayable object columns #86

Merged

Conversation

27pchrisl
Copy link
Contributor

This PR enables support for object columns that support Laravel's Arrayable interface.

When using https://github.com/spatie/laravel-data objects/collections as eloquent casts, there was an incompatibility with IsJsonRelation that expects the column to be an array type. This change simply calls toArray if the collection can convert to an array.

@staudenmeir
Copy link
Owner

Thanks, I'll take a look.

@27pchrisl
Copy link
Contributor Author

This might fix #84 if it's the same sort of setup.

@staudenmeir staudenmeir merged commit b889960 into staudenmeir:master Dec 11, 2022
@staudenmeir
Copy link
Owner

Thanks, I released a new version.

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

2 participants