diff --git a/app/Http/Requests/Company/StoreCompanyRequest.php b/app/Http/Requests/Company/StoreCompanyRequest.php index f60ca455e9..62c0eb8f12 100644 --- a/app/Http/Requests/Company/StoreCompanyRequest.php +++ b/app/Http/Requests/Company/StoreCompanyRequest.php @@ -65,18 +65,8 @@ class StoreCompanyRequest extends Request $input['google_analytics_key'] = $input['google_analytics_url']; } - // $company_settings = CompanySettings::defaults(); - - //@todo this code doesn't make sense as we never return $company_settings anywhere - //@deprecated??? - // if (array_key_exists('settings', $input) && ! empty($input['settings'])) { - // foreach ($input['settings'] as $key => $value) { - // $company_settings->{$key} = $value; - // } - // } - if (array_key_exists('portal_domain', $input)) { - $input['portal_domain'] = strtolower($input['portal_domain']); + $input['portal_domain'] = rtrim(strtolower($input['portal_domain']), "/"); } $this->replace($input); diff --git a/app/Utils/Traits/Inviteable.php b/app/Utils/Traits/Inviteable.php index d2ac6eca9c..595b3a51f2 100644 --- a/app/Utils/Traits/Inviteable.php +++ b/app/Utils/Traits/Inviteable.php @@ -68,7 +68,7 @@ trait Inviteable ); $writer = new Writer($renderer); - $qr = $writer->writeString($this->getPaymentLink()); + $qr = $writer->writeString($this->getPaymentLink(), 'utf-8'); return " {$qr}"; @@ -80,7 +80,7 @@ trait Inviteable if (Ninja::isHosted()) { $domain = $this->company->domain(); } else { - $domain = config('ninja.app_url'); + $domain = strlen($this->company->portal_domain) > 5 ? $this->company->portal_domain : config('ninja.app_url'); } $entity_type = Str::snake(class_basename($this->entityType())); @@ -121,7 +121,7 @@ trait Inviteable if (Ninja::isHosted()) { $domain = $this->company->domain(); } else { - $domain = config('ninja.app_url'); + $domain = strlen($this->company->portal_domain) > 5 ? $this->company->portal_domain : config('ninja.app_url'); } switch ($this->company->portal_mode) {