subscription = $subscription->withoutRelations(); $this->hrefs = $hrefs; } /** * Update the Last Consulted At field for the given contact. * * @return void */ public function handle(): void { if (! $this->batching()) { return; // @codeCoverageIgnore } $batch = $this->batch(); collect($this->hrefs) ->each(function ($href) use ($batch) { $this->deleteVCard($href, $batch); }); } /** * Delete the contact. * * @param string $href * @param \Illuminate\Bus\Batch $batch * @return void */ private function deleteVCard(string $href, Batch $batch): void { $batch->add([ new DeleteVCard($this->subscription, $href), ]); } }