feature - 30 - Update payment method
This commit is contained in:
parent
592a402d23
commit
4b31f3d315
3 changed files with 7 additions and 0 deletions
|
|
@ -104,4 +104,9 @@ public function cancel(Request $request): RedirectResponse
|
||||||
|
|
||||||
return back()->with('success', 'Subscription canceled. Access will continue until the end of your billing period.');
|
return back()->with('success', 'Subscription canceled. Access will continue until the end of your billing period.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function billingPortal(Request $request)
|
||||||
|
{
|
||||||
|
return $request->user()->redirectToBillingPortal(route('billing'));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,7 @@
|
||||||
<span class="text-white">
|
<span class="text-white">
|
||||||
<span class="text-gray-400">{{ ucfirst($planner->pm_type ?? 'Card') }}</span>
|
<span class="text-gray-400">{{ ucfirst($planner->pm_type ?? 'Card') }}</span>
|
||||||
•••• {{ $planner->pm_last_four }}
|
•••• {{ $planner->pm_last_four }}
|
||||||
|
<a href="{{ route('billing.portal') }}" class="ml-2 text-accent-blue hover:underline text-sm">Update</a>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
|
||||||
|
|
@ -45,5 +45,6 @@
|
||||||
})->name('users.index');
|
})->name('users.index');
|
||||||
|
|
||||||
Route::get('/billing', [SubscriptionController::class, 'billing'])->name('billing')->middleware('saas');
|
Route::get('/billing', [SubscriptionController::class, 'billing'])->name('billing')->middleware('saas');
|
||||||
|
Route::get('/billing/portal', [SubscriptionController::class, 'billingPortal'])->name('billing.portal')->middleware('saas');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue