entity = $entity; $this->signature = $signature; } /** * Execute the job. * * @return void */ public function handle() { $invitation = $this->entity->invitations->whereNotNull('signature_base64')->first(); if (! $invitation) { return; } $invitation->signature_base64 = $this->signature; $invitation->save(); $this->entity->refresh()->service()->touchPdf(true); // if($this->entity instanceof PurchaseOrder) // (new CreatePurchaseOrderPdf($invitation))->handle(); // else // (new CreateEntityPdf($invitation))->handle(); } }