Skip to content
Discussion options

You must be logged in to vote

I guess contactable_type is not expected to be casted as an Enum... but why not?

If you want to do this, that would mean that every usage of contactable_type need to pass the Enum instance while Nova POST requests can only send in a string. This is currently not supported add just complicates the usage without any advantage.

You can set/limit the possible type by using MorphTo::types() as suggested in the documentation: https://nova.laravel.com/docs/4.0/resources/relationships.html#morphto

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by andypooletrioteca
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #5305 on February 09, 2023 09:33.