Конечно, есть лучшие способы сделать это в Laravel, но вы можете использовать \ DB :: select
$yourVariable=\DB::select("yourSQLScript");
или использовать \ DB :: raw () для столбца GROUP_CONCAT
$yourVariable=\DB::table('tb_subject_allocation as s1')
->join('tb_subject as s2','s1.subject_id','=','s2.subject_id')
->join('tb_staff_primary as s3','s1.staff_id','=','s3.staff_id ')
->join('tb_batch as s4','s1.batch_id','=','s4.batch_id')
->where('s4.batch_id','=','1')
->groupBy('subject_code')
->select('s2.subject_name','s2.subject_code',
\DB::raw("GROUP_CONCAT(
DISTINCT tb_staff_primary.staff_name
ORDER BY tb_staff_primary.staff_name DESC SEPARATOR ',')
as staffs")
->get();