Phase 3 (Provisioning): - Create ProvisioningServiceInterface abstraction - Implement VirtFusionService for VPS provisioning via REST API - Implement SynergyCPService for dedicated server provisioning - Implement EnhanceService for web hosting provisioning - Create ProvisioningFactory for service type routing - Add API config for VirtFusion, SynergyCP, Enhance Phase 4 (Customer Dashboard): - Enhance DashboardController with real data (services, subscriptions, invoices, pending amounts, next renewal) - Rebuild Dashboard.vue with stats cards, active subscriptions list, recent invoices table, and quick action buttons Phase 8 (Marketing): - Add Terms of Service page with 15 sections - Add Privacy Policy page (GDPR/CCPA aware) - Add Acceptable Use Policy page - Add Service Level Agreement page (99.99% uptime, credit calc) - 52 tests passing, build clean Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
44 lines
1.4 KiB
PHP
44 lines
1.4 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Providers;
|
|
|
|
use App\Http\Responses\LoginResponse;
|
|
use App\Http\Responses\RegisterResponse;
|
|
use App\Services\Billing\BillingServiceFactory;
|
|
use App\Services\Provisioning\ProvisioningFactory;
|
|
use Illuminate\Cache\RateLimiting\Limit;
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Support\Facades\RateLimiter;
|
|
use Illuminate\Support\Facades\URL;
|
|
use Illuminate\Support\ServiceProvider;
|
|
use Laravel\Fortify\Contracts\LoginResponse as LoginResponseContract;
|
|
use Laravel\Fortify\Contracts\RegisterResponse as RegisterResponseContract;
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
{
|
|
public function register(): void
|
|
{
|
|
$this->app->singleton(LoginResponseContract::class, LoginResponse::class);
|
|
$this->app->singleton(RegisterResponseContract::class, RegisterResponse::class);
|
|
$this->app->singleton(BillingServiceFactory::class);
|
|
$this->app->singleton(ProvisioningFactory::class);
|
|
}
|
|
|
|
public function boot(): void
|
|
{
|
|
if ($this->app->environment('production', 'local')) {
|
|
URL::forceScheme('https');
|
|
}
|
|
|
|
RateLimiter::for('api', function (Request $request) {
|
|
return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip());
|
|
});
|
|
|
|
RateLimiter::for('register', function (Request $request) {
|
|
return Limit::perMinute(3)->by($request->ip());
|
|
});
|
|
}
|
|
}
|