subscription = $subscription->withoutRelations(); $this->contact = $contact; } /** * Update the Last Consulted At field for the given contact. * * @return void */ public function handle(): void { if (! $this->batching()) { return; } Log::info(__CLASS__.' '.$this->contact->uri); $response = $this->subscription->getClient() ->request('GET', $this->contact->uri); $this->chainUpdateVCard($response->body()); } private function chainUpdateVCard(string $card): void { $dto = new ContactUpdateDto($this->contact->uri, $this->contact->etag, $card); if (($batch = $this->batch()) !== null) { $batch->add([ new UpdateVCard($this->subscription->user, $this->subscription->addressbook->name, $dto), ]); } } }