@extends('layouts.app') @section('title', $role->exists ? 'Edit Role' : 'New Role') @section('content') @php $editing = $role->exists; @endphp

{{ $editing ? 'Edit Role' : 'New Role' }}

Back
@if($errors->any())
@endif
@csrf @if($editing) @method('PUT') @endif
@if($isProtected)
Built-in role — the name is fixed because application logic refers to it. You can still change its permissions below.
@else @error('name')
{{ $message }}
@enderror
Lowercase letters, numbers and underscores only.
@endif
@if($role->name === 'superadmin')
Superadmin bypasses all permission checks by design, so its permission set cannot be restricted. Remove the role from a user instead.
@else
Permissions
@foreach($groups as $group => $permissions)
{{ $group }}
@foreach($permissions as $name => $label)
@endforeach
@endforeach
@endif
@push('scripts') @endpush @endsection