@extends('layouts.admin') @section('title', $role->exists ? 'Edit Role' : 'Create Role') @section('content') @php($canManage = auth()->user()?->hasPermission('roles', 'manage')) @php($current = (array) ($role->permissions ?? [])) @php($isSystem = (bool) $role->is_system) @php($action = $role->exists ? route('admin.roles.update', $role) : route('admin.roles.store'))
@if($role->exists) {{ $role->name }} · {{ $role->users_count ?? $role->users()->count() }} user(s) @if($role->is_system) · System@endif @else Define a new reusable role with module-level permissions. @endif