@if(count($result) > 0)
@foreach ($result as $items)
{{$items->roles_name}}
@endforeach
@else
No data available in table
@endif
@php
$query = "SELECT cu.id, ku.roles_name, gu.groupname, GROUP_CONCAT(lu.action_name) AS action_name, cu.allowsupporthun, cu.allshardhub FROM comm_action_roles AS cu JOIN comm_roles AS ku ON cu.roles = ku.id JOIN comm_groupmanagement AS gu ON cu.group = gu.id JOIN comm_action AS lu ON FIND_IN_SET(lu.id, REPLACE(cu.action, ', ', ',')) > 0 WHERE cu.show_hide = '0' GROUP BY cu.id, ku.roles_name, gu.groupname, cu.allowsupporthun, cu.allshardhub";
$sett_rol_gro3 = DB::select($query);
@endphp
Roles *
Roles
Group
Action
Modify
@if(count($sett_rol_gro3) > 0)
@foreach ($sett_rol_gro3 as $items)
@php
$curr_sett2 = DB::table('comm_action')->select('id', 'action_name')->where('show_hide','1')->get();
if ($_GET['id'] ?? '' && $_GET['id'] != '') {
$curr_sett4 = DB::table('comm_action_roles')
->select(DB::raw('CAST(action AS CHAR) AS action'))
->where('id', '=', $_GET['id'])
->get();
$id = $_GET['id'];
$query = "SELECT cu.id, cu.action, su.roles_name, gm.groupname,
(SELECT GROUP_CONCAT(action_name) FROM comm_action WHERE id IN (cu.action)) AS action_name,
cu.allowsupporthun, cu.allshardhub
FROM comm_action_roles AS cu
JOIN comm_roles AS su ON cu.roles = su.id
JOIN comm_groupmanagement AS gm ON cu.group = gm.id
WHERE cu.id = ?";
$curr_sett5 = DB::select($query, [$id]);
}
@endphp