📜  group_concat laravel - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:51.449000             🧑  作者: Mango

代码示例1
$assignment_details = $assignment->raw_plan()
                                ->select('raw_plans.*', DB::raw('group_concat(name) as names'))
                                ->where('assignment_id', 1)
                                ->groupBy('flag')
                                ->get();