settings->company_logo)) { UnlinkFile::dispatchNow(config('filesystems.default'), $company->settings->company_logo); } } public function uploadLogo($file, $company, $entity) { if ($file) { $path = UploadAvatar::dispatchNow($file, $company->company_key); if ($path) { $settings = $entity->settings; $settings->company_logo = $path; $entity->settings = $settings; $entity->save(); } } else{ /* Catch Failures */ $settings = $entity->settings; $settings->company_logo = ''; $entity->settings = $settings; $entity->save(); } } }