{{-- Permission picker for one role. Renders $permissionGroups (from AccessController::groupPermissions) as one row per resource with a toggle pill per action, plus a toolbar (filter, select/clear all, copy from another role). $checked is the array of fully-qualified permission names (":") already held; $copyFrom is the roles offered as a starting point. Behaviour lives in admin/access/show.blade.php. --}} @php($short = fn ($name) => \Illuminate\Support\Str::after($name, ':')) @php($titleCase = fn ($s) => \Illuminate\Support\Str::of($s)->replace(['-', '_'], ' ')->headline()) @php($total = $permissionGroups->flatten(1)->count())
@if ($copyFrom->isNotEmpty()) @endif

{{ count($checked) }} of {{ $total }} permissions selected

@foreach ($permissionGroups as $group => $items)
@foreach ($items as $item) @endforeach
@endforeach