Files
ladill-servers/database/seeders/ServerProductSeeder.php
T
isaaccladandCursor 608e6947bf
Deploy Ladill Servers / deploy (push) Successful in 25s
Add server product catalog so VPS and dedicated pages can take orders.
Seed Contabo-backed VPS and dedicated plans, open the order modal from dashboard links, and show clearer order CTAs when the catalog is empty.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-06 20:01:05 +00:00

151 lines
5.8 KiB
PHP

<?php
namespace Database\Seeders;
use App\Models\HostingProduct;
use Illuminate\Database\Seeder;
class ServerProductSeeder extends Seeder
{
public function run(): void
{
$products = [
[
'name' => 'VPS S',
'slug' => 'vps-s',
'description' => 'Entry-level VPS with 4 vCPU cores, 8 GB RAM, 75 GB NVMe SSD, and unlimited bandwidth. Perfect for small projects and development.',
'category' => 'vps',
'type' => 'vps',
'price_monthly' => 0,
'price_quarterly' => 0,
'price_yearly' => 0,
'currency' => 'GHS',
'disk_gb' => 75,
'bandwidth_gb' => null,
'cpu_cores' => 3,
'ram_mb' => 8192,
'ssl_included' => true,
'contabo_product_id' => 'V91',
'contabo_region' => 'EU',
'is_active' => true,
'is_featured' => false,
'is_visible' => true,
'sort_order' => 10,
],
[
'name' => 'VPS M',
'slug' => 'vps-m',
'description' => 'Mid-range VPS with 6 vCPU cores, 12 GB RAM, 100 GB NVMe SSD, and unlimited bandwidth. Ideal for growing applications and medium traffic sites.',
'category' => 'vps',
'type' => 'vps',
'price_monthly' => 0,
'price_quarterly' => 0,
'price_yearly' => 0,
'currency' => 'GHS',
'disk_gb' => 100,
'bandwidth_gb' => null,
'cpu_cores' => 6,
'ram_mb' => 12288,
'ssl_included' => true,
'contabo_product_id' => 'V94',
'contabo_region' => 'EU',
'is_active' => true,
'is_featured' => true,
'is_visible' => true,
'sort_order' => 11,
],
[
'name' => 'VPS L',
'slug' => 'vps-l',
'description' => 'High-performance VPS with 8 vCPU cores, 24 GB RAM, 200 GB NVMe SSD, and unlimited bandwidth. Built for demanding workloads and high-traffic applications.',
'category' => 'vps',
'type' => 'vps',
'price_monthly' => 0,
'price_quarterly' => 0,
'price_yearly' => 0,
'currency' => 'GHS',
'disk_gb' => 200,
'bandwidth_gb' => null,
'cpu_cores' => 8,
'ram_mb' => 24576,
'ssl_included' => true,
'contabo_product_id' => 'V97',
'contabo_region' => 'EU',
'is_active' => true,
'is_featured' => false,
'is_visible' => true,
'sort_order' => 12,
],
[
'name' => 'VPS XL',
'slug' => 'vps-xl',
'description' => 'Enterprise VPS with 12 vCPU cores, 48 GB RAM, 250 GB NVMe SSD, and unlimited bandwidth. Maximum performance for resource-intensive applications.',
'category' => 'vps',
'type' => 'vps',
'price_monthly' => 0,
'price_quarterly' => 0,
'price_yearly' => 0,
'currency' => 'GHS',
'disk_gb' => 250,
'bandwidth_gb' => null,
'cpu_cores' => 12,
'ram_mb' => 49152,
'ssl_included' => true,
'contabo_product_id' => 'V100',
'contabo_region' => 'EU',
'is_active' => true,
'is_featured' => false,
'is_visible' => true,
'sort_order' => 13,
],
[
'name' => 'Dedicated Entry',
'slug' => 'dedicated-entry',
'description' => 'Entry-level dedicated server with 12 CPU cores (AMD Ryzen 9 7900), 64 GB RAM, 1 TB NVMe SSD, and unlimited bandwidth. Full root access with no virtualization overhead.',
'category' => 'dedicated',
'type' => 'dedicated',
'price_monthly' => 0,
'price_yearly' => 0,
'currency' => 'GHS',
'disk_gb' => 1000,
'bandwidth_gb' => null,
'cpu_cores' => 12,
'ram_mb' => 65536,
'ssl_included' => true,
'contabo_product_id' => 'amd-ryzen-12-cores',
'is_active' => true,
'is_featured' => false,
'is_visible' => true,
'sort_order' => 20,
],
[
'name' => 'Dedicated Pro',
'slug' => 'dedicated-pro',
'description' => 'Professional dedicated server with 24 CPU cores (AMD EPYC 9224), 128 GB ECC RAM, 2 TB SSD storage, and unlimited bandwidth. Maximum power for enterprise workloads.',
'category' => 'dedicated',
'type' => 'dedicated',
'price_monthly' => 0,
'price_yearly' => 0,
'currency' => 'GHS',
'disk_gb' => 2000,
'bandwidth_gb' => null,
'cpu_cores' => 24,
'ram_mb' => 131072,
'ssl_included' => true,
'contabo_product_id' => 'amd-genoa-24-cores',
'is_active' => true,
'is_featured' => true,
'is_visible' => true,
'sort_order' => 21,
],
];
foreach ($products as $product) {
HostingProduct::updateOrCreate(
['slug' => $product['slug']],
$product
);
}
}
}