Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Laravel casts method not casting types #2962

@maicol07

Description

@maicol07

API Platform version(s) affected: 4.1.0

Description
If you define casts via the Laravel method it isn't caught up by API Platform. Only $casts works.

How to reproduce
Try to create a model and define casts via the casts() method, not the $casts property

Possible Solution
Might need to call the initializeHasAttributes method

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions