full_name 是什么?
$category = Category::find($id);
if($category) {
return [$category->id => $category->full_name];
}
模型定义的访问器 这里忘记了
推荐文章: