mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Fixes for subdomain resolution for MultiDB
This commit is contained in:
parent
b89b6ef38d
commit
364f7addb6
@ -41,7 +41,7 @@ class SetDomainNameDb
|
||||
|
||||
if (strpos($request->getHost(), 'invoicing.co') !== false)
|
||||
{
|
||||
$subdomain = array_first(explode('.', $request->getHost()));
|
||||
$subdomain = explode('.', $request->getHost())[0];
|
||||
|
||||
$query = [
|
||||
'subdomain' => $subdomain,
|
||||
|
@ -33,6 +33,7 @@ class SubscriptionTransformer extends EntityTransformer
|
||||
|
||||
public function transform(Subscription $subscription): array
|
||||
{
|
||||
$company = $subscription->company;
|
||||
|
||||
return [
|
||||
'id' => $this->encodePrimaryKey($subscription->id),
|
||||
@ -59,7 +60,8 @@ class SubscriptionTransformer extends EntityTransformer
|
||||
'allow_plan_changes' => (bool)$subscription->allow_plan_changes,
|
||||
'refund_period' => (int)$subscription->refund_period,
|
||||
'webhook_configuration' => $subscription->webhook_configuration ?: [],
|
||||
'purchase_page' => (string)route('client.subscription.purchase', $subscription->hashed_id),
|
||||
'purchase_page' => (string)$company->domain() . "/client/subscription/{$subscription->hashed_id}/purchase",
|
||||
//'purchase_page' => (string)route('client.subscription.purchase', $subscription->hashed_id),
|
||||
'currency_id' => (string) $subscription->currency_id,
|
||||
'is_deleted' => (bool)$subscription->is_deleted,
|
||||
'created_at' => (int)$subscription->created_at,
|
||||
|
Loading…
x
Reference in New Issue
Block a user