where(fn (Builder $query) => $query->where('property_id', $property->id)->orWhereNull('property_id')); } protected function getHeaderActions(): array { return [ Action::make('readAll') ->label('Alle als gelesen markieren') ->icon(Heroicon::OutlinedCheck) ->color('gray') ->visible(fn (): bool => $this->getTableQuery()->unread()->exists()) ->action(fn () => $this->getTableQuery()->unread()->update(['read_at' => now()])), ]; } }