Skip to content

Model array cast saved as string #3306

Open
@alanondra

Description

@alanondra
  • Laravel-mongodb Version: 5.2.0
  • PHP Version: 8.2.27
  • Database Driver & Version: 6.0.20

Description:

Steps to reproduce

  1. Create Model with property in casts method defined as array
  2. Save Model
  3. Query Model from Collection in Studio 3T

Expected behaviour

I expected it to save as a MongoDB array.

Actual behaviour

It saved as a PHP string representation of an array.

Logs: Insert log.txt here (if necessary)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions