components([ Section::make('Activity Details') ->schema([ TextEntry::make('created_at') ->label('Date') ->dateTime(), TextEntry::make('description'), TextEntry::make('event') ->badge(), TextEntry::make('log_name') ->label('Log Name'), TextEntry::make('subject_type') ->label('Subject Type') ->formatStateUsing(fn (?string $state): string => $state ? class_basename($state) : '—'), TextEntry::make('subject_id') ->label('Subject ID'), TextEntry::make('causer.name') ->label('Causer'), KeyValueEntry::make('properties.attributes') ->label('Changes') ->visible(fn ($record): bool => filled($record->properties['attributes'] ?? null)), KeyValueEntry::make('properties.old') ->label('Previous Values') ->visible(fn ($record): bool => filled($record->properties['old'] ?? null)), ]) ->columns(2), ]); } }