This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
Hello,
I'm having some problems after following the tutorial on how to extend the User plugin. I'm basically building the same plugin in the video, as I'm just giving my users the ability to add their pet information in their profile. However, when I try to save the data from the fields, I get this error: http://imgur.com/kE6JUC0 I don't have a "pet" field in my Pet model, so I can't just add "protected $jsonable = ['pet'];". You can check my plugin code here: https://github.com/GoodNello/Pets
Can you help me? The error message is not very helpful.
Thanks!
Why can't you just add protected $jsonable = ['pet'];?
I don't see the problem. I got the same issue with the user plugin and added protected $jsonable = ['column_name']; to the user model and it got rid of my issues.
From what I know, you need the column has to be jsonable in the model if you're working with arrays.
Thank you for your answer, but even by adding "protected $jsonable = ['pet'];" in my Pet model, it gives me the same error.
Last updated
For fields that don't really exist in the database, you should use the purgeable
trait in addition to any formatting traits such as jsonable.
1-4 of 4