【发布时间】:2016-06-14 10:38:22
【问题描述】:
未在数据库中插入多选值。
我的 fields.yaml 代码是:
related_recipe:
label: 'Related Recipe'
span: auto
nameFrom: recipe_title
descriptionFrom: description
attributes: {multiple:'multiple'}
type: relation
我的型号代码是:
public $belongsTo = [
'related_recipe' => [
'Qdata\Taeq\Models\Recipe',
'conditions' => 'status = 1'
],
];
目前只有一个选定的值插入到数据库中。需要在数据库中添加多个值。有没有人能解决的?
【问题讨论】:
-
@VijayWilson 我想使用 type = "relation" not partial 来设置数据。
标签: laravel-5 octobercms