@extends('admin.layout.template') @section('title', 'Roles') @section('content')

Roles

+ Add Role
@foreach($roles as $index => $role) @endforeach
# Role Name Permissions Action
{{ $index + 1 }} {{ $role->name }}
@if($role->departments->isNotEmpty()) Department: {{ $role->departments->pluck('name')->join(', ') }} @else No departments @endif
@foreach($role->grouped_permissions as $module => $actions)
{{ $module }} @foreach($actions as $action) {{ $action }} @endforeach
@endforeach
@if($role->name !== 'Super Admin') Edit @endif
@endsection