contact = $contact; } /** * Execute the job. * * @return void */ public function handle() { if (StringHelper::isNullOrWhitespace($this->contact->default_avatar_color)) { $this->contact->setAvatarColor(); $this->contact->save(); } // generate the default avatar app(GenerateDefaultAvatarService::class)->execute([ 'contact_id' => $this->contact->id, ]); } }