settings?->company_logo))->handle(); } public function uploadLogo($file, $company, $entity) { if ($file) { $path = (new UploadAvatar($file, $company->company_key))->handle(); if ($path) { $settings = $entity->settings; $settings->company_logo = $path; $entity->settings = $settings; $entity->save(); } } } }