Skip to content

Support for complex serialization #103

@X-Coder264

Description

@X-Coder264

Attribute hydration has methods for both simple conversion - deserializeUsing() - and complex hydration - fillUsing().
In comparison, attribute serialization only has support for simple conversion - serializeUsing().

It'd be nice to have support for complex serialization (which would receive the model that's being serialized in the closure too) while defining the fields in the schema. That way we don't need to add extra Eloquent accessors on our models or create a dedicated resource class if we have just one custom attribute field.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions