@extends('layouts.app') @section('title', 'إدارة الصلاحيات والأدوار') @section('content')
@foreach($roles as $role)
{{ $role->name }}
{{ $role->users()->count() }} مستخدمين
الصلاحيات الممنوحة:
@if($role->id == 1) جميع الصلاحيات (مدير نظام) @else @forelse($role->permissions as $perm) {{ $perm->name_ar ?? $perm->name }} @empty لا يوجد صلاحيات محددة @endforelse @endif
@if($role->id != 1)
@csrf @method('DELETE')
@else @endif
@endforeach @if($roles->isEmpty())
لا توجد أدوار مسجلة بعد.
@endif
@include('roles.modals') @endsection