Skip to content

[Bug] Method Spatie\MediaLibrary\MediaCollections\Models\Collections\MediaCollection::delete does not exist in a nested model #23

Open
@xenorum

Description

@xenorum

Bug report

What I did

  • I have a model Post with a related model (HasOne) SubPost with media
  • A CRUD for Post that includes a SubPost
  • Whenever I would create (or update) a model, the error Method Spatie\MediaLibrary\MediaCollections\Models\Collections\MediaCollection::delete does not exist. arises

What I expected to happen

Media gets deleted and uploaded (if needed)

What I've already tried to fix it

I've tried also tried with a 'relationship' field, same error.

Context to replicate the bug - Backpack, Laravel, PHP, DB version

See https://github.com/xenorum/backpack-media-repeatable for an example of the setup

Thanks for your insights, I am stuck on this one.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

No status

Status

Needs Testing, Review or Docs

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions