@extends('layouts.app') @section('title', __('dashboard.sidebar_roles')) @section('page_heading', __('dashboard.sidebar_roles')) @section('content')
{{-- Head --}}
{{ __('dashboard.Roles') }} {{ $roles->total() }}
@can('view permissions') {{ __('dashboard.Permissions') }} @endcan @can('create roles') {{ __('dashboard.Add Role') }} @endcan
@if($roles->isEmpty())
@include('layouts.partials.index-empty-state', ['icon' => 'fa-solid fa-shield', 'title' => __('dashboard.No roles found.'), 'message' => ''])
@else
@foreach($roles as $role) @php $isProtected = \App\Support\PermissionRegistry::isProtectedRole($role->name); @endphp @endforeach
{{ __('dashboard.Name') }} {{ __('dashboard.Guard Name') }} الحالة {{ __('dashboard.Created At') }} {{ __('dashboard.Actions') }}
{{ \App\Support\PermissionRegistry::roleLabel($role->name) }}
#{{ $role->id }}
{{ $role->guard_name }} @if($isProtected) محمي @else نشط @endif {{ $role->created_at->format('Y-m-d') }} @canany(['edit roles','delete roles'])
@can('edit roles') {{ __('dashboard.Edit') }} @endcan @can('delete roles')
@csrf @method('DELETE')
@endcan
@endcanany
{{ $roles->links() }}
@endif
@endsection