fix: stripe invoice paid webhook
fix: prepare customer initiated tier change fix: separate view for subscriptions
This commit is contained in:
@@ -7,6 +7,13 @@ use Livewire\Component;
|
||||
|
||||
class Actions extends Component
|
||||
{
|
||||
public $server_limits = 0;
|
||||
public function mount()
|
||||
{
|
||||
$limits = currentTeam()->limits;
|
||||
$this->server_limits = data_get($limits, 'serverLimit', 0);
|
||||
|
||||
}
|
||||
public function cancel()
|
||||
{
|
||||
try {
|
||||
@@ -69,7 +76,8 @@ class Actions extends Component
|
||||
return handleError($e, $this);
|
||||
}
|
||||
}
|
||||
public function stripeCustomerPortal() {
|
||||
public function stripeCustomerPortal()
|
||||
{
|
||||
$session = getStripeCustomerPortalSession(currentTeam());
|
||||
redirect($session->url);
|
||||
}
|
||||
|
||||
19
app/Livewire/Subscription/Show.php
Normal file
19
app/Livewire/Subscription/Show.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Livewire\Subscription;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
class Show extends Component
|
||||
{
|
||||
public function mount()
|
||||
{
|
||||
if (!isCloud()) {
|
||||
return redirect()->route('dashboard');
|
||||
}
|
||||
}
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.subscription.show');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user