我想获取tag里面的值,利用getAttribute,但是并没有出现
附上model代码
public function getColumnListAttribute()
{
return $this->columns->pluck('id')->all();
}
下面是controller
public function edit($art_id)
{
$data = (new Category)->tree();
$field = Article::find($art_id);
$column = Column::pluck('name','id');
return view('admin.article.edit',compact('data','field','column'));
}
这个是balde
<select class="form-control js-example-basic-multiple" name="column_list[]" multiple="multiple" >
</select>