Assign Permissions
Role: {{ $role->display_name }} — tick what this role may do. Children are independent; you don't need to grant a whole group.
Back
@endif
@php
// Build a name => id and id-set for current selection, then render from the catalogue (ordered).
$idByName = $permissions->pluck('id', 'name'); // 'prison.borstal.view' => 12
$selected = collect($rolePermissions ?? [])->flip(); // id => true
$actions = config('permissions.actions');
$groups = config('permissions.groups');
$groupClass = ['prison'=>'pg-prison','probation'=>'pg-probation','independent'=>'pg-independent'];
@endphp