added pricing, orgs
tests / ci (push) Canceled after 0s

This commit is contained in:
2026-10-04 20:34:19 -07:00
parent 999d5ad28d
commit 2ca3860557
52 changed files with 3467 additions and 47 deletions
+17
View File
@@ -1,11 +1,28 @@
<?php
use Illuminate\Http\RedirectResponse;
use Illuminate\Support\Facades\Route;
Route::middleware(['auth'])->group(function () {
Route::redirect('settings', 'settings/profile');
Route::livewire('settings/profile', 'pages::settings.profile')->name('profile.edit');
// Deliberately outside the "subscribed" middleware group so that a lapsed
// subscriber can still manage their plan, or subscribe again.
Route::livewire('settings/billing', 'pages::settings.billing')->name('billing.edit');
Route::post('settings/billing/portal', function (): RedirectResponse {
$organization = request()->user()?->currentOrganization()->first();
// The Stripe customer portal only exists once an organization has been
// created as a Stripe customer, which happens on the first checkout.
if ($organization === null || ! $organization->hasStripeId()) {
return redirect()->route('billing.edit');
}
return redirect()->to($organization->billingPortalUrl(route('billing.edit')));
})->name('billing.portal');
});
Route::middleware(['auth', 'verified'])->group(function () {