Includes all work from phases 6-9+ and frontend polish rounds 1 & 2: - Login history with device trust, new device notifications, session management - Churn prevention: cancellation surveys, winback campaigns with email sequences - Financial reports: revenue, P&L, tax, aging, refund, subscription reports with PDF/CSV/JSON export - Configurable checkout: plan config groups/options, build-your-own VPS - Frontend polish: fix broken legal links, add SEO meta tags, favicon, font display=swap, Head titles on all 14 marketing pages, mobile responsive fixes, AuthLayout legal footer, remove false 24/7 claims, hide empty stats, correct uptime SLA to 99.9%, GameServers notify buttons linked to /contact, 301 redirects for /terms and /privacy - WHMCS migration scripts - Update legal page effective dates to March 16, 2026 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
37 lines
1.3 KiB
PHP
37 lines
1.3 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Database\Factories;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
use Illuminate\Support\Str;
|
|
|
|
/** @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Plan> */
|
|
class PlanFactory extends Factory
|
|
{
|
|
/** @return array<string, mixed> */
|
|
public function definition(): array
|
|
{
|
|
$name = fake()->unique()->words(2, true);
|
|
|
|
return [
|
|
'name' => ucwords($name),
|
|
'slug' => Str::slug($name),
|
|
'description' => fake()->sentence(),
|
|
'service_type' => fake()->randomElement(['vps', 'dedicated', 'hosting', 'mysql', 'game', 'backups']),
|
|
'price' => fake()->randomFloat(2, 5, 500),
|
|
'currency' => 'USD',
|
|
'billing_cycle' => fake()->randomElement(['monthly', 'quarterly', 'annual']),
|
|
'features' => [
|
|
'cpu' => fake()->numberBetween(1, 16).' vCPU',
|
|
'ram' => fake()->randomElement(['1GB', '2GB', '4GB', '8GB', '16GB', '32GB']),
|
|
'disk' => fake()->randomElement(['20GB', '50GB', '100GB', '200GB', '500GB']),
|
|
'bandwidth' => fake()->randomElement(['1TB', '2TB', '5TB', '10TB', 'Unlimited']),
|
|
],
|
|
'status' => 'active',
|
|
'sort_order' => fake()->numberBetween(0, 100),
|
|
];
|
|
}
|
|
}
|