OctoberCMS无法保存Repeater字段:Unexpected type of array when attempting to save attribute

错误提示:

Unexcepted type of array, should attribute "FidleName" be jsonable?

出现这个错误是因为repeater字段需要做json格式化处理,只需要在plugins下找到对应的/plugins/path/to/models/name.php文件

添加这一行即可解决

protected $jsonable = ['fieldname'];

Post Comment