@php($selected = collect(old('permissions', $selected ?? []))->map(fn ($v) => (string) $v))
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.