octobercms plugins - Does not contain a definition for 'file_src' October CMS -
i working @ october cms plugin development, have problem file upload. put fileupload
type file_src
. when go to resource shows error :
model/resource fields: name: label: name type: text required: true file_src: label: upload type: fileupload grade_id: label: grade type: dropdown emptyoption: select showsearch: true subject_id: label: subject type: dropdown emptyoption: select showsearch: true type_id: label: type type: dropdown emptyoption: select showsearch: true
how can fix error?
i fixed it! must use $attachone or $attachmany relation on model
i added following code in resource.php in models
public $attachone = [ 'file_src' => 'system\models\file' ];
thats working now!
Comments
Post a Comment