mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 16:54:31 -04:00
Fixes for URLs
This commit is contained in:
parent
12d8da942e
commit
9773e4808d
@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
namespace App\Utils\Traits;
|
namespace App\Utils\Traits;
|
||||||
|
|
||||||
|
use App\Utils\Ninja;
|
||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -46,7 +47,10 @@ trait Inviteable
|
|||||||
{
|
{
|
||||||
$entity_type = Str::snake(class_basename($this->entityType()));
|
$entity_type = Str::snake(class_basename($this->entityType()));
|
||||||
|
|
||||||
|
if(Ninja::isHosted())
|
||||||
$domain = isset($this->company->portal_domain) ? $this->company->portal_domain : $this->company->domain();
|
$domain = isset($this->company->portal_domain) ? $this->company->portal_domain : $this->company->domain();
|
||||||
|
else
|
||||||
|
$domain = config('ninja.app_url');
|
||||||
|
|
||||||
switch ($this->company->portal_mode) {
|
switch ($this->company->portal_mode) {
|
||||||
case 'subdomain':
|
case 'subdomain':
|
||||||
@ -69,7 +73,10 @@ trait Inviteable
|
|||||||
public function getPortalLink() :string
|
public function getPortalLink() :string
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if(Ninja::isHosted())
|
||||||
$domain = isset($this->company->portal_domain) ? $this->company->portal_domain : $this->company->domain();
|
$domain = isset($this->company->portal_domain) ? $this->company->portal_domain : $this->company->domain();
|
||||||
|
else
|
||||||
|
$domain = config('ninja.app_url');
|
||||||
|
|
||||||
switch ($this->company->portal_mode) {
|
switch ($this->company->portal_mode) {
|
||||||
case 'subdomain':
|
case 'subdomain':
|
||||||
|
Loading…
x
Reference in New Issue
Block a user