user()->hasRole(RoleEnum::PERUSAHAAN->value); } public static function getBadge(Model $ownerRecord, string $pageClass): ?string { return $ownerRecord->cooperationMedia()->count(); } public function table(Table $table): Table { return $table ->columns([ ...RowIndexColumn::make(), TextColumn::make('partnerMedia.name') ->label('Nama') ->searchable(), TextColumn::make('status') ->label('Status') ->badge(), ]) ->emptyStateIcon(Heroicon::OutlinedNewspaper) ->emptyStateHeading(fn () => CheerfulNotification::getByKey('cooperation.media_data_empty_heading')) ->emptyStateDescription(fn () => CheerfulNotification::getByKey('cooperation.media_data_empty')) ->defaultSort('created_at', 'desc'); } }