mirror of
https://github.com/filamentphp/filament.git
synced 2026-10-24 23:35:30 +08:00
Merge pull request #6451 from filamentphp/dont-require-tenant-to-get-billing-url
Don't require tenant to get billing url
This commit is contained in:
@@ -93,7 +93,7 @@
|
||||
<x-filament::dropdown.list>
|
||||
<x-filament::dropdown.list.item
|
||||
:color="$billingItem?->getColor() ?? 'gray'"
|
||||
:href="$billingItemUrl ?? filament()->getTenantBillingUrl($currentTenant)"
|
||||
:href="$billingItemUrl ?? filament()->getTenantBillingUrl()"
|
||||
:icon="$billingItem?->getIcon() ?? 'heroicon-m-credit-card'"
|
||||
tag="a"
|
||||
>
|
||||
|
||||
@@ -72,7 +72,7 @@ use Illuminate\Support\Facades\Facade;
|
||||
* @method static Model | null getTenant()
|
||||
* @method static string | null getTenantAvatarUrl(Model $tenant)
|
||||
* @method static BillingProvider | null getTenantBillingProvider()
|
||||
* @method static string | null getTenantBillingUrl(Model $tenant)
|
||||
* @method static string | null getTenantBillingUrl(Model | null $tenant = null)
|
||||
* @method static array<MenuItem> getTenantMenuItems()
|
||||
* @method static string | null getTenantModel()
|
||||
* @method static string getTenantName(Model $tenant)
|
||||
|
||||
@@ -246,9 +246,9 @@ class FilamentManager
|
||||
return $this->getCurrentContext()->getTenantBillingProvider();
|
||||
}
|
||||
|
||||
public function getTenantBillingUrl(Model $tenant): ?string
|
||||
public function getTenantBillingUrl(?Model $tenant = null): ?string
|
||||
{
|
||||
return $this->getCurrentContext()->getTenantBillingUrl($tenant);
|
||||
return $this->getCurrentContext()->getTenantBillingUrl($tenant ?? $this->getTenant());
|
||||
}
|
||||
|
||||
public function getTenantRegistrationPage(): ?string
|
||||
|
||||
+1
-1
@@ -17,6 +17,6 @@ class VerifySparkBillableIsSubscribed extends VerifyBillableIsSubscribed
|
||||
{
|
||||
protected function redirect(string $billableType): string
|
||||
{
|
||||
return Filament::getTenantBillingUrl(Filament::getTenant());
|
||||
return Filament::getTenantBillingUrl();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user