//Model设置好这个
protected $casts = [
'tags' => 'json',
];
//新增数据
$input['tags']=['孩子','宝宝','成长'];
Article::create($input);
但是数据库存的是
["\u5b69\u5b50","\u5b9d\u5b9d","\u6210\u957f"]
有没有办法转为中文?
["孩子","宝宝","成长"]
修改的评论也不能少于六个字哦!
0
分享