Skip to content
Advertisement

How to change collection_name in spatie?

I’m a newbie in spatie. I have some trouble, I don’t know how to change collection_name in spatie.

I select a record with collection_name is enter code here and change it to doctor_avatar and I do like:

JavaScript

But have an error: BadMethodCallException Method update does not exist.

Can you help me solve this problem!

Advertisement

Answer

Problem is, that your variable $media is type Collection, and Collection does not have update method (as you can see in error message).

Try it like this:

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement