@extends('layouts.app') @section('content')
{{ $role->name }}
{{ $role->users()->count() }} user(s) assigned to this role
@if ($role->name === 'Super Admin') Protected Role @endif
@if ($errors->any())
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif
@csrf
name === 'Super Admin' ? 'readonly' : '' }} required> @if ($role->name === 'Super Admin') This role's name is protected and cannot be changed. @endif
Choose what users with this role can access —
@php // Icons for the top-level permission categories. $categoryIcons = [ 'Administrator' => 'users', 'Configuration' => 'settings', 'Main' => 'layout', 'Reporting' => 'bar-chart-2', ]; // Icons for the sub-categories nested within each category. $subCategoryIcons = [ 'Company' => 'briefcase', 'Customer' => 'user', 'Roles' => 'shield', 'Users' => 'user-check', 'Branch Management' => 'map-pin', 'Gold Price' => 'dollar-sign', 'EKYC' => 'eye', 'Inventory Management' => 'box', 'Spread Management' => 'trending-up', 'Withdrawal' => 'arrow-down-circle', 'Audit Trail' => 'activity', 'Contract' => 'file', 'Transactions' => 'clock', 'Reference Data' => 'database', 'Additional Charges' => 'percent', 'Ledger' => 'book', ]; @endphp
@foreach ($permissionGroups as $category => $subCategories)
{{ $category }}
@foreach ($subCategories as $subCategory => $permissions) @php $subCategoryKey = $category . '|' . $subCategory; @endphp
{{ $subCategory }}
@foreach ($permissions as $permission) @php $actionLabel = ucwords( str_replace( ['_', '-'], ' ', \Illuminate\Support\Str::after( $permission->name, '.', ), ), ); @endphp
name, old('permissions', $assignedPermissions)) ? 'checked' : '' }}>
@endforeach
@endforeach
@endforeach
Cancel
@endsection @section('styles') @endsection @section('scripts') @endsection