@extends('backEnd.layouts.master') @section('title','Roles & Permissions') @section('content')

Roles & Permissions

Default ecommerce roles — assign to staff when creating users
@can('staff.manage') Manage Staff @endcan
@foreach($roles as $item) @php $role = $item['model']; $guide = $roleGuide[$role->name] ?? null; @endphp
{{ $item['label'] }}
{{ $item['description'] }}
@if(!empty($guide['description_bn']))
{{ $guide['description_bn'] }}
@endif
@if($role->name === 'admin') System @endif
{{ $role->permissions_count }} permissions {{ $role->users_count }} users
@if(!empty($guide['can']))
Can:
    @foreach(array_slice($guide['can'], 0, 4) as $canItem)
  • {{ $canItem }}
  • @endforeach @if(count($guide['can']) > 4)
  • + {{ count($guide['can']) - 4 }} more…
  • @endif
@endif @if($role->name !== 'admin') Edit Permissions @else Admin has full store access automatically. @endif
@endforeach
Role guide (English + বাংলা)

Staff Management → Add Staff → role বেছে নিন। Module (CRM, Support, SMS) subscription package এ ON থাকলে তবেই সেই menu দেখাবে — permission আলাদা।

@foreach($roleGuide as $slug => $guide) @if(!empty($guide['hidden'])) @continue @endif

@if(!empty($guide['description_bn']))

{{ $guide['description_bn'] }}

@endif
@if(!empty($guide['can']))
✓ Can do
    @foreach($guide['can'] as $item)
  • {{ $item }}
  • @endforeach
@endif @if(!empty($guide['cannot']))
✗ Cannot do
    @foreach($guide['cannot'] as $item)
  • {{ $item }}
  • @endforeach
@endif
@endforeach

Important notes

  • Admin role locked — সব permission auto (Gate bypass)।
  • Moderator (Hub) — Moderator Hub + chat reply; CRM sidebar এর জন্য আলাদা crm.manage দিন।
  • SMS only staff — custom role বানিয়ে শুধু sms.manage দিন (পুরনো moderator role এ SMS নেই)।
  • Sidebar menu = Module (package) + Permission (role) — দুটোই match করতে হবে।
@endsection