@php($selected = collect(old('permissions', $selected ?? []))->map(fn ($v) => (string) $v))
@csrf @if ($method !== 'POST') @method($method) @endif
@error('name')
{{ $message }}
@enderror

Tick what this role can do per module. Read = view, Write = create, Edit = update, Delete = remove. Unticked permissions hide the tab and block the action.

@foreach ($actions as $action) @endforeach @foreach ($modules as $modKey => $modLabel) @foreach ($actions as $action) @php($pid = $permMap[$modKey.'.'.$action] ?? null) @endforeach @endforeach
Module{{ $action }}
{{ $modLabel }} @if ($pid) contains((string) $pid))> @endif
Cancel