refactor + fixes
This commit is contained in:
@@ -53,7 +53,8 @@ function showBoarding(): bool
|
||||
}
|
||||
function refreshSession(): void
|
||||
{
|
||||
session(['currentTeam' => currentTeam()]);
|
||||
$team = Team::find(currentTeam()->id);
|
||||
session(['currentTeam' => $team]);
|
||||
}
|
||||
function general_error_handler(Throwable | null $err = null, $that = null, $isJson = false, $customErrorMessage = null): mixed
|
||||
{
|
||||
|
||||
@@ -70,7 +70,6 @@ function isSubscriptionActive()
|
||||
}
|
||||
function isSubscriptionOnGracePeriod()
|
||||
{
|
||||
|
||||
$team = currentTeam();
|
||||
if (!$team) {
|
||||
return false;
|
||||
@@ -96,7 +95,7 @@ function subscriptionProvider()
|
||||
function getStripeCustomerPortalSession(Team $team)
|
||||
{
|
||||
Stripe::setApiKey(config('subscription.stripe_api_key'));
|
||||
$return_url = route('team.show');
|
||||
$return_url = route('team.index');
|
||||
$stripe_customer_id = $team->subscription->stripe_customer_id;
|
||||
$session = \Stripe\BillingPortal\Session::create([
|
||||
'customer' => $stripe_customer_id,
|
||||
|
||||
Reference in New Issue
Block a user