Closed lkmadushan closed 3 weeks ago
I have the same issue with attributes that are collections of enums.
I get an error like: Object of class App\Enums\MyEnum could not be converted to string
.
I think/hope that this PR should fix it as well.
Thanks!
Allow to pass an enum to
Structure::validateAndCreate
method.Previously below code didn't work.
Some libraries (ex: Lighthouse PHP) which is a GraphQL implementation, sends Enum types through the request. I think we don't need to send the Enum string value again to the validate method. It should accept Enum types also.