Skip to content

Error Adding New Fields #2468

Closed as not planned
Closed as not planned
@phillmorgan28

Description

@phillmorgan28
  • Laravel-mongodb Version: 3.9.2
  • PHP Version: 8.1.5
  • Database Driver & Version: 5.0.9 Community

Description:

Unable to save new fields to an existing document

Steps to reproduce

  1. Create a document
  2. Load the document
  3. Attempt to add new fields as below:
$category->sort_order = $request->input('sort_order');
$category->image = $request->input('image'); // NEW FIELD
$category->status = $request->input('status');
$category->save();

Expected behaviour

The new field should be saved as part of the document

Actual behaviour

The field is not added

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