service = $service; } /** * Get roles for the manager. * * @return DataCollection */ #[Computed] public function roles(): DataCollection { return $this->service->getRoles(); } public function mount(): void { $this->header = TableHeader::collect([ [ "key" => "name", "label" => "Role Name", ], [ "key" => "users", "label" => "User Assigned", ], [ "key" => "services", "label" => "Services", ], [ "key" => "status", "label" => "Status", ], ], DataCollection::class); } }; ?>
{{ __('Add role') }} @scope('cell_users', $role) @php /** @var RoleData $role */ @endphp
@foreach($role->users as $user) @endforeach
@endscope @scope('cell_status', $role) @php /** @var RoleData $role */ @endphp {{ ucfirst($role->status->name) }} @endscope @scope('cell_services', $role) @php /** @var RoleData $role */ @endphp @foreach($role->services as $service) {{$service->name}} @endforeach @endscope @scope('actions', $role) @endscope