laravel分类group by 语句:

public function index()
{
$res = TagModel::select(['type'])
->where('user_id', $this->uid())
->selectRaw('group_concat(name) as names')
->groupBy('type')
->pluck('names', 'type');
return out_put_json($res);
}