{{$role->name}} Permissions

Permissions List

@csrf @php $groupedPermissions = $permissions->groupBy(function($item) { return explode('-', $item->name)[0]; // 'role-list' se 'role' extract karenge }); @endphp @foreach($groupedPermissions as $groupName => $groupPermissions) @endforeach
Permission Name List Create Edit Delete
{{ ucfirst($groupName) }} firstWhere('name', $groupName . '-list'))->id, $rolePermissions) ? 'checked' : '' }}> firstWhere('name', $groupName . '-create'))->id, $rolePermissions) ? 'checked' : '' }}> firstWhere('name', $groupName . '-edit'))->id, $rolePermissions) ? 'checked' : '' }}> firstWhere('name', $groupName . '-delete'))->id, $rolePermissions) ? 'checked' : '' }}>