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
+27 -1
View File
@@ -2,11 +2,15 @@
namespace App\Providers;
use App\Http\Responses\RegisterResponse;
use App\Models\Organization;
use Carbon\CarbonImmutable;
use Illuminate\Support\Facades\Date;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\ServiceProvider;
use Illuminate\Validation\Rules\Password;
use Laravel\Cashier\Cashier;
use Laravel\Fortify\Contracts\RegisterResponse as RegisterResponseContract;
class AppServiceProvider extends ServiceProvider
{
@@ -15,7 +19,19 @@ class AppServiceProvider extends ServiceProvider
*/
public function register(): void
{
//
$this->registerFortifyResponses();
}
/**
* Swap Fortify's registration response for one that starts checkout for the
* plan the account signed up with.
*/
protected function registerFortifyResponses(): void
{
$this->app->singleton(
RegisterResponseContract::class,
RegisterResponse::class,
);
}
/**
@@ -24,6 +40,16 @@ class AppServiceProvider extends ServiceProvider
public function boot(): void
{
$this->configureDefaults();
$this->configureCashier();
}
/**
* Make organizations, rather than users, the Stripe customer. This also
* determines the foreign key Cashier uses on the subscriptions table.
*/
protected function configureCashier(): void
{
Cashier::useCustomerModel(Organization::class);
}
/**