Skip to content

$casts doesn't work #1580

Closed
Closed
@elfeffe

Description

@elfeffe

I'm using latest version of the package and of Laravel. Also latest PHP 7 and MongoDB 4
I'm using

 /**
     * The attributes that should be cast to native types.
     *
     * @var array
     */
    protected $casts = [
        'force_stock' => 'integer'
    ];

But force-stock always save as string, unless I cast it by hand before save.
Any fix?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions