@php $color=['table-primary','table-secondary','table-success','table-danger','table-warning','table-info','table-light','table-primary','table-secondary','table-success','table-danger','table-warning','table-info','table-light','table-primary','table-secondary','table-success','table-danger','table-warning','table-info','table-light','table-primary','table-secondary','table-success','table-danger','table-warning','table-info','table-light','table-primary','table-secondary','table-success','table-danger','table-warning','table-info','table-light']; $role_name=$data['role_data']->name; $permission_custom_array=['list','create','edit','delete']; @endphp @php $i=1; @endphp @foreach ($data['permission_category'] as $category) @php $category_id=$category->p_category_id; $category_name=$category->p_category_name; @endphp @php $permissions=array(); @endphp @foreach ($data['rolePermissions'] as $permission) @if($permission->category_id==$category_id) @php array_push($permissions,$permission->name); @endphp @endif @endforeach @php $i++; @endphp @endforeach
# Category Permissions
{{$i}} {{$category_name}} @if (!empty($permissions)) @foreach ($permissions as $permission) @foreach ($permission_custom_array as $custom_permission) @if(strpos($permission, $custom_permission) !== false) @endif @endforeach @endforeach @else @endif