feat: seed new VPS plans with multi-cycle pricing
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -15,186 +15,170 @@ class PlanSeeder extends Seeder
|
|||||||
Plan::query()
|
Plan::query()
|
||||||
->where('service_type', 'vps')
|
->where('service_type', 'vps')
|
||||||
->whereNotIn('slug', [
|
->whereNotIn('slug', [
|
||||||
'vps-nano', 'vps-micro', 'vps-mini', 'vps-standard',
|
'vps-1', 'vps-2', 'vps-4', 'vps-8', 'vps-16', 'vps-32',
|
||||||
'vps-plus', 'vps-pro', 'vps-storage-500', 'vps-storage-1tb',
|
'stor-500', 'stor-1tb',
|
||||||
])
|
])
|
||||||
->update(['status' => 'archived']);
|
->update(['status' => 'archived']);
|
||||||
|
|
||||||
$plans = [
|
$plans = [
|
||||||
// ─── VPS Plans (2026 NVMe Lineup) ────────────────────────────
|
// ─── VPS Plans ─────────────────────────────────────────────────
|
||||||
[
|
[
|
||||||
'name' => 'Nano',
|
'name' => 'VPS-1',
|
||||||
'slug' => 'vps-nano',
|
'slug' => 'vps-1',
|
||||||
'description' => 'Entry-level NVMe VPS for simple tasks, testing, and lightweight applications.',
|
'description' => 'Entry-level VPS with 1 GB RAM for simple tasks, testing, and lightweight applications.',
|
||||||
'service_type' => 'vps',
|
'service_type' => 'vps',
|
||||||
'price' => 3.50,
|
'price' => 5.00,
|
||||||
'billing_cycle' => 'monthly',
|
'billing_cycle' => 'monthly',
|
||||||
'features' => [
|
'features' => [
|
||||||
'cpu' => '1 vCPU',
|
'cpu' => '1 vCPU',
|
||||||
'ram' => '1 GB',
|
'ram' => '1 GB',
|
||||||
'storage' => '15 GB NVMe',
|
'storage' => '25 GB SSD',
|
||||||
'bandwidth' => '2 TB',
|
'bandwidth' => 'Unmetered',
|
||||||
'ipv4' => '1 IPv4',
|
'ipv4' => '1 Included',
|
||||||
'ipv6' => '1 /64 IPv6',
|
'ipv6' => '/64 Included',
|
||||||
'control_panel' => 'VirtFusion',
|
'control_panel' => 'VirtFusion',
|
||||||
'os' => 'Linux & Windows (BYOL)',
|
'os' => 'Linux & Windows (BYOL)',
|
||||||
'virtfusion_package_id' => 1,
|
'virtfusion_package_id' => 19,
|
||||||
'virtfusion_user_id' => 1,
|
|
||||||
'virtfusion_hypervisor_id' => 1,
|
|
||||||
],
|
],
|
||||||
'sort_order' => 1,
|
'sort_order' => 1,
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'name' => 'Micro',
|
'name' => 'VPS-2',
|
||||||
'slug' => 'vps-micro',
|
'slug' => 'vps-2',
|
||||||
'description' => 'NVMe VPS with 2 GB RAM - double the RAM of competitors at the same price point.',
|
'description' => 'VPS with 2 GB RAM for small web apps, development servers, and lightweight services.',
|
||||||
'service_type' => 'vps',
|
'service_type' => 'vps',
|
||||||
'price' => 5.95,
|
'price' => 8.00,
|
||||||
'billing_cycle' => 'monthly',
|
'billing_cycle' => 'monthly',
|
||||||
'features' => [
|
'features' => [
|
||||||
'cpu' => '1 vCPU',
|
'cpu' => '1 vCPU',
|
||||||
'ram' => '2 GB',
|
'ram' => '2 GB',
|
||||||
'storage' => '30 GB NVMe',
|
'storage' => '50 GB SSD',
|
||||||
'bandwidth' => '3 TB',
|
'bandwidth' => 'Unmetered',
|
||||||
'ipv4' => '1 IPv4',
|
'ipv4' => '1 Included',
|
||||||
'ipv6' => '1 /64 IPv6',
|
'ipv6' => '/64 Included',
|
||||||
'control_panel' => 'VirtFusion',
|
'control_panel' => 'VirtFusion',
|
||||||
'os' => 'Linux & Windows (BYOL)',
|
'os' => 'Linux & Windows (BYOL)',
|
||||||
'virtfusion_package_id' => 1,
|
'virtfusion_package_id' => 20,
|
||||||
'virtfusion_user_id' => 1,
|
|
||||||
'virtfusion_hypervisor_id' => 1,
|
|
||||||
],
|
],
|
||||||
'sort_order' => 2,
|
'sort_order' => 2,
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'name' => 'Mini',
|
'name' => 'VPS-4',
|
||||||
'slug' => 'vps-mini',
|
'slug' => 'vps-4',
|
||||||
'description' => 'Hero plan with 4 GB RAM and NVMe storage - beats Hetzner CX22 with faster disks.',
|
'description' => 'VPS with 4 GB RAM and dual vCPUs for web hosting, databases, and moderate workloads.',
|
||||||
'service_type' => 'vps',
|
'service_type' => 'vps',
|
||||||
'price' => 8.95,
|
'price' => 15.00,
|
||||||
'billing_cycle' => 'monthly',
|
'billing_cycle' => 'monthly',
|
||||||
'features' => [
|
'features' => [
|
||||||
'cpu' => '2 vCPU',
|
'cpu' => '2 vCPU',
|
||||||
'ram' => '4 GB',
|
'ram' => '4 GB',
|
||||||
'storage' => '50 GB NVMe',
|
'storage' => '80 GB SSD',
|
||||||
'bandwidth' => '4 TB',
|
'bandwidth' => 'Unmetered',
|
||||||
'ipv4' => '1 IPv4',
|
'ipv4' => '1 Included',
|
||||||
'ipv6' => '1 /64 IPv6',
|
'ipv6' => '/64 Included',
|
||||||
'control_panel' => 'VirtFusion',
|
'control_panel' => 'VirtFusion',
|
||||||
'os' => 'Linux & Windows (BYOL)',
|
'os' => 'Linux & Windows (BYOL)',
|
||||||
'virtfusion_package_id' => 1,
|
'virtfusion_package_id' => 21,
|
||||||
'virtfusion_user_id' => 1,
|
|
||||||
'virtfusion_hypervisor_id' => 1,
|
|
||||||
],
|
],
|
||||||
'sort_order' => 3,
|
'sort_order' => 3,
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'name' => 'Standard',
|
'name' => 'VPS-8',
|
||||||
'slug' => 'vps-standard',
|
'slug' => 'vps-8',
|
||||||
'description' => 'Premium 8 GB RAM VPS with NVMe - double the RAM of competitors at half the price.',
|
'description' => 'VPS with 8 GB RAM and quad vCPUs for production workloads and demanding applications.',
|
||||||
'service_type' => 'vps',
|
'service_type' => 'vps',
|
||||||
'price' => 14.95,
|
'price' => 30.00,
|
||||||
'billing_cycle' => 'monthly',
|
'billing_cycle' => 'monthly',
|
||||||
'features' => [
|
'features' => [
|
||||||
'cpu' => '2 vCPU',
|
'cpu' => '4 vCPU',
|
||||||
'ram' => '8 GB',
|
'ram' => '8 GB',
|
||||||
'storage' => '80 GB NVMe',
|
'storage' => '160 GB SSD',
|
||||||
'bandwidth' => '6 TB',
|
'bandwidth' => 'Unmetered',
|
||||||
'ipv4' => '1 IPv4',
|
'ipv4' => '1 Included',
|
||||||
'ipv6' => '1 /64 IPv6',
|
'ipv6' => '/64 Included',
|
||||||
'control_panel' => 'VirtFusion',
|
'control_panel' => 'VirtFusion',
|
||||||
'os' => 'Linux & Windows (BYOL)',
|
'os' => 'Linux & Windows (BYOL)',
|
||||||
'virtfusion_package_id' => 1,
|
'virtfusion_package_id' => 22,
|
||||||
'virtfusion_user_id' => 1,
|
|
||||||
'virtfusion_hypervisor_id' => 1,
|
|
||||||
],
|
],
|
||||||
'sort_order' => 4,
|
'sort_order' => 4,
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'name' => 'Plus',
|
'name' => 'VPS-16',
|
||||||
'slug' => 'vps-plus',
|
'slug' => 'vps-16',
|
||||||
'description' => 'High-RAM VPS with 12 GB memory and quad-core CPU for demanding applications.',
|
'description' => 'High-performance VPS with 16 GB RAM and 6 vCPUs for heavy multi-threaded workloads.',
|
||||||
'service_type' => 'vps',
|
'service_type' => 'vps',
|
||||||
'price' => 22.95,
|
'price' => 55.00,
|
||||||
'billing_cycle' => 'monthly',
|
'billing_cycle' => 'monthly',
|
||||||
'features' => [
|
'features' => [
|
||||||
'cpu' => '4 vCPU',
|
'cpu' => '6 vCPU',
|
||||||
'ram' => '12 GB',
|
'ram' => '16 GB',
|
||||||
'storage' => '120 GB NVMe',
|
'storage' => '320 GB SSD',
|
||||||
'bandwidth' => '8 TB',
|
'bandwidth' => 'Unmetered',
|
||||||
'ipv4' => '1 IPv4',
|
'ipv4' => '1 Included',
|
||||||
'ipv6' => '1 /64 IPv6',
|
'ipv6' => '/64 Included',
|
||||||
'control_panel' => 'VirtFusion',
|
'control_panel' => 'VirtFusion',
|
||||||
'os' => 'Linux & Windows (BYOL)',
|
'os' => 'Linux & Windows (BYOL)',
|
||||||
'virtfusion_package_id' => 1,
|
'virtfusion_package_id' => 23,
|
||||||
'virtfusion_user_id' => 1,
|
|
||||||
'virtfusion_hypervisor_id' => 1,
|
|
||||||
],
|
],
|
||||||
'sort_order' => 5,
|
'sort_order' => 5,
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'name' => 'Pro',
|
'name' => 'VPS-32',
|
||||||
'slug' => 'vps-pro',
|
'slug' => 'vps-32',
|
||||||
'description' => 'Ultimate RAM VPS with 16 GB memory and NVMe for production workloads.',
|
'description' => 'Ultimate VPS with 32 GB RAM and 8 vCPUs for enterprise-grade production environments.',
|
||||||
'service_type' => 'vps',
|
'service_type' => 'vps',
|
||||||
'price' => 29.95,
|
'price' => 99.00,
|
||||||
'billing_cycle' => 'monthly',
|
'billing_cycle' => 'monthly',
|
||||||
'features' => [
|
'features' => [
|
||||||
'cpu' => '4 vCPU',
|
'cpu' => '8 vCPU',
|
||||||
'ram' => '16 GB',
|
'ram' => '32 GB',
|
||||||
'storage' => '160 GB NVMe',
|
'storage' => '640 GB SSD',
|
||||||
'bandwidth' => '10 TB',
|
'bandwidth' => 'Unmetered',
|
||||||
'ipv4' => '1 IPv4',
|
'ipv4' => '1 Included',
|
||||||
'ipv6' => '1 /64 IPv6',
|
'ipv6' => '/64 Included',
|
||||||
'control_panel' => 'VirtFusion',
|
'control_panel' => 'VirtFusion',
|
||||||
'os' => 'Linux & Windows (BYOL)',
|
'os' => 'Linux & Windows (BYOL)',
|
||||||
'virtfusion_package_id' => 1,
|
'virtfusion_package_id' => 24,
|
||||||
'virtfusion_user_id' => 1,
|
|
||||||
'virtfusion_hypervisor_id' => 1,
|
|
||||||
],
|
],
|
||||||
'sort_order' => 6,
|
'sort_order' => 6,
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'name' => 'Storage-500',
|
'name' => 'Storage 500',
|
||||||
'slug' => 'vps-storage-500',
|
'slug' => 'stor-500',
|
||||||
'description' => 'Storage-focused VPS with 500 GB SATA SSD for backups, media, and file storage.',
|
'description' => 'Storage-focused VPS with 500 GB SSD for backups, media, and file storage.',
|
||||||
'service_type' => 'vps',
|
'service_type' => 'vps',
|
||||||
'price' => 24.95,
|
'price' => 18.00,
|
||||||
'billing_cycle' => 'monthly',
|
'billing_cycle' => 'monthly',
|
||||||
'features' => [
|
'features' => [
|
||||||
'cpu' => '2 vCPU',
|
'cpu' => '2 vCPU',
|
||||||
'ram' => '4 GB',
|
'ram' => '2 GB',
|
||||||
'storage' => '500 GB SSD',
|
'storage' => '500 GB SSD',
|
||||||
'bandwidth' => '8 TB',
|
'bandwidth' => 'Unmetered',
|
||||||
'ipv4' => '1 IPv4',
|
'ipv4' => '1 Included',
|
||||||
'ipv6' => '1 /64 IPv6',
|
'ipv6' => '/64 Included',
|
||||||
'control_panel' => 'VirtFusion',
|
'control_panel' => 'VirtFusion',
|
||||||
'os' => 'Linux & Windows (BYOL)',
|
'os' => 'Linux & Windows (BYOL)',
|
||||||
'virtfusion_package_id' => 1,
|
'virtfusion_package_id' => 41,
|
||||||
'virtfusion_user_id' => 1,
|
|
||||||
'virtfusion_hypervisor_id' => 1,
|
|
||||||
],
|
],
|
||||||
'sort_order' => 7,
|
'sort_order' => 7,
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'name' => 'Storage-1TB',
|
'name' => 'Storage 1TB',
|
||||||
'slug' => 'vps-storage-1tb',
|
'slug' => 'stor-1tb',
|
||||||
'description' => 'Mass storage VPS with 1 TB SATA SSD for large-scale file storage and archives.',
|
'description' => 'Mass storage VPS with 1 TB SSD for large-scale file storage and archives.',
|
||||||
'service_type' => 'vps',
|
'service_type' => 'vps',
|
||||||
'price' => 44.95,
|
'price' => 28.00,
|
||||||
'billing_cycle' => 'monthly',
|
'billing_cycle' => 'monthly',
|
||||||
'features' => [
|
'features' => [
|
||||||
'cpu' => '4 vCPU',
|
'cpu' => '2 vCPU',
|
||||||
'ram' => '8 GB',
|
'ram' => '4 GB',
|
||||||
'storage' => '1 TB SSD',
|
'storage' => '1 TB SSD',
|
||||||
'bandwidth' => '12 TB',
|
'bandwidth' => 'Unmetered',
|
||||||
'ipv4' => '1 IPv4',
|
'ipv4' => '1 Included',
|
||||||
'ipv6' => '1 /64 IPv6',
|
'ipv6' => '/64 Included',
|
||||||
'control_panel' => 'VirtFusion',
|
'control_panel' => 'VirtFusion',
|
||||||
'os' => 'Linux & Windows (BYOL)',
|
'os' => 'Linux & Windows (BYOL)',
|
||||||
'virtfusion_package_id' => 1,
|
'virtfusion_package_id' => 41,
|
||||||
'virtfusion_user_id' => 1,
|
|
||||||
'virtfusion_hypervisor_id' => 1,
|
|
||||||
],
|
],
|
||||||
'sort_order' => 8,
|
'sort_order' => 8,
|
||||||
],
|
],
|
||||||
@@ -615,5 +599,30 @@ class PlanSeeder extends Seeder
|
|||||||
], $plan),
|
], $plan),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ─── VPS Multi-Cycle Pricing ───────────────────────────────────
|
||||||
|
$vpsPricing = [
|
||||||
|
'vps-1' => ['monthly' => 5.00, 'quarterly' => 14.25, 'semi_annual' => 27.00, 'annual' => 51.00],
|
||||||
|
'vps-2' => ['monthly' => 8.00, 'quarterly' => 22.80, 'semi_annual' => 43.20, 'annual' => 81.60],
|
||||||
|
'vps-4' => ['monthly' => 15.00, 'quarterly' => 42.75, 'semi_annual' => 81.00, 'annual' => 153.00],
|
||||||
|
'vps-8' => ['monthly' => 30.00, 'quarterly' => 85.50, 'semi_annual' => 162.00, 'annual' => 306.00],
|
||||||
|
'vps-16' => ['monthly' => 55.00, 'quarterly' => 156.75, 'semi_annual' => 297.00, 'annual' => 561.00],
|
||||||
|
'vps-32' => ['monthly' => 99.00, 'quarterly' => 282.15, 'semi_annual' => 534.60, 'annual' => 1009.80],
|
||||||
|
'stor-500' => ['monthly' => 18.00, 'quarterly' => 51.30, 'semi_annual' => 97.20, 'annual' => 183.60],
|
||||||
|
'stor-1tb' => ['monthly' => 28.00, 'quarterly' => 79.80, 'semi_annual' => 151.20, 'annual' => 285.60],
|
||||||
|
];
|
||||||
|
|
||||||
|
foreach ($vpsPricing as $slug => $prices) {
|
||||||
|
$plan = Plan::where('slug', $slug)->first();
|
||||||
|
if (! $plan) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
foreach ($prices as $cycle => $price) {
|
||||||
|
\App\Models\PlanPrice::updateOrCreate(
|
||||||
|
['plan_id' => $plan->id, 'billing_cycle' => $cycle],
|
||||||
|
['price' => $price],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user