1
0
Fork 0

Seed curated catalog data

This commit is contained in:
Henrik Hautakoski 2026-04-29 15:34:22 +02:00
parent ae93c7e1a6
commit 3b05a045ed
3 changed files with 611 additions and 30 deletions

View file

@ -0,0 +1,64 @@
<?php
namespace Database\Seeders;
use App\Models\Brand;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
class BrandSeeder extends Seeder
{
use WithoutModelEvents;
public function run(): void
{
$brands = [
['name' => 'ASUS', 'slug' => 'asus', 'website_url' => 'https://www.asus.com'],
['name' => 'Lenovo', 'slug' => 'lenovo', 'website_url' => 'https://www.lenovo.com'],
['name' => 'Apple', 'slug' => 'apple', 'website_url' => 'https://www.apple.com'],
['name' => 'Dell', 'slug' => 'dell', 'website_url' => 'https://www.dell.com'],
['name' => 'HP', 'slug' => 'hp', 'website_url' => 'https://www.hp.com'],
['name' => 'Supermicro', 'slug' => 'supermicro', 'website_url' => 'https://www.supermicro.com'],
['name' => 'MSI', 'slug' => 'msi', 'website_url' => 'https://www.msi.com'],
['name' => 'Gigabyte', 'slug' => 'gigabyte', 'website_url' => 'https://www.gigabyte.com'],
['name' => 'Sapphire', 'slug' => 'sapphire', 'website_url' => 'https://www.sapphiretech.com'],
['name' => 'Corsair', 'slug' => 'corsair', 'website_url' => 'https://www.corsair.com'],
['name' => 'G.Skill', 'slug' => 'g-skill', 'website_url' => 'https://www.gskill.com'],
['name' => 'Kingston', 'slug' => 'kingston', 'website_url' => 'https://www.kingston.com'],
['name' => 'Samsung', 'slug' => 'samsung', 'website_url' => 'https://semiconductor.samsung.com'],
['name' => 'Western Digital', 'slug' => 'western-digital', 'website_url' => 'https://www.westerndigital.com'],
['name' => 'Crucial', 'slug' => 'crucial', 'website_url' => 'https://www.crucial.com'],
['name' => 'Seagate', 'slug' => 'seagate', 'website_url' => 'https://www.seagate.com'],
['name' => 'Toshiba', 'slug' => 'toshiba', 'website_url' => 'https://www.toshiba.com'],
['name' => 'Keychron', 'slug' => 'keychron', 'website_url' => 'https://www.keychron.com'],
['name' => 'Logitech', 'slug' => 'logitech', 'website_url' => 'https://www.logitech.com'],
['name' => 'Razer', 'slug' => 'razer', 'website_url' => 'https://www.razer.com'],
['name' => 'SteelSeries', 'slug' => 'steelseries', 'website_url' => 'https://steelseries.com'],
['name' => 'Elgato', 'slug' => 'elgato', 'website_url' => 'https://www.elgato.com'],
['name' => 'Shure', 'slug' => 'shure', 'website_url' => 'https://www.shure.com'],
['name' => 'Peak Design', 'slug' => 'peak-design', 'website_url' => 'https://www.peakdesign.com'],
['name' => 'Alienware', 'slug' => 'alienware', 'website_url' => 'https://www.dell.com/alienware'],
['name' => 'LG', 'slug' => 'lg', 'website_url' => 'https://www.lg.com'],
['name' => 'Ergotron', 'slug' => 'ergotron', 'website_url' => 'https://www.ergotron.com'],
['name' => 'VIVO', 'slug' => 'vivo', 'website_url' => 'https://www.vivo-us.com'],
['name' => 'BenQ', 'slug' => 'benq', 'website_url' => 'https://www.benq.com'],
['name' => 'Datacolor', 'slug' => 'datacolor', 'website_url' => 'https://www.datacolor.com'],
['name' => 'Focusrite', 'slug' => 'focusrite', 'website_url' => 'https://focusrite.com'],
['name' => 'Creative', 'slug' => 'creative', 'website_url' => 'https://us.creative.com'],
['name' => 'iFixit', 'slug' => 'ifixit', 'website_url' => 'https://www.ifixit.com'],
['name' => 'ARCTIC', 'slug' => 'arctic', 'website_url' => 'https://www.arctic.de'],
];
foreach ($brands as $brand) {
Brand::query()->updateOrCreate(
['slug' => $brand['slug']],
[
'name' => $brand['name'],
'description' => null,
'website_url' => $brand['website_url'],
'active' => true,
],
);
}
}
}

View file

@ -2,9 +2,6 @@
namespace Database\Seeders;
use App\Models\Brand;
use App\Models\Category;
use App\Models\Product;
use App\Models\User;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
@ -25,32 +22,10 @@ class DatabaseSeeder extends Seeder
'email' => 'test@example.com',
]);
$brands = Brand::factory(12)->create();
$this->call(CategorySeeder::class);
$allCategories = Category::query()->get();
$parentCategories = $allCategories->whereNull('parent_id')->values();
$childCategories = $allCategories->whereNotNull('parent_id')->values();
if ($allCategories->isEmpty()) {
return;
}
Product::factory(100)
->state(fn (): array => [
'category_id' => $childCategories->isNotEmpty()
? $childCategories->random()->id
: $allCategories->random()->id,
'brand_id' => $brands->random()->id,
])
->create();
Product::factory(30)
->state(fn (): array => [
'category_id' => $parentCategories->random()->id,
'brand_id' => $brands->random()->id,
])
->create();
$this->call([
BrandSeeder::class,
CategorySeeder::class,
ProductSeeder::class,
]);
}
}

View file

@ -0,0 +1,542 @@
<?php
namespace Database\Seeders;
use App\Models\Brand;
use App\Models\Category;
use App\Models\Product;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Illuminate\Support\Str;
class ProductSeeder extends Seeder
{
use WithoutModelEvents;
public function run(): void
{
$categoryIds = Category::query()
->pluck('id', 'slug')
->map(fn (mixed $id): int => (int) $id);
$brandIds = Brand::query()
->pluck('id', 'slug')
->map(fn (mixed $id): int => (int) $id);
$products = [
[
'name' => 'ASUS ROG Strix G16 (2024)',
'sku' => 'LAP-ASUS-ROG-G16-2024',
'brand' => 'asus',
'category' => 'computers-laptop',
'price' => 1899.00,
'stock' => 23,
'short' => '16-inch gaming laptop with Intel Core i9 and RTX 4070.',
'description' => 'ROG Strix G16 with 16-inch 240Hz display, Intel Core i9-14900HX, GeForce RTX 4070 Laptop GPU, 32GB DDR5 and 1TB PCIe 4.0 NVMe SSD. Suitable for esports, streaming, and demanding creative workloads.',
'days' => 3,
],
[
'name' => 'Lenovo ThinkPad X1 Carbon Gen 12',
'sku' => 'LAP-LEN-X1CARBON-G12',
'brand' => 'lenovo',
'category' => 'computers-laptop',
'price' => 2149.00,
'stock' => 14,
'short' => 'Ultralight business laptop with OLED display and long battery life.',
'description' => 'ThinkPad X1 Carbon Gen 12 with Intel Core Ultra 7, 32GB LPDDR5X memory, 1TB PCIe SSD and 14-inch 2.8K OLED panel. Durable chassis, premium keyboard and enterprise-grade security.',
'days' => 7,
],
[
'name' => 'Apple MacBook Pro 14-inch M3 Pro',
'sku' => 'LAP-APL-MBP14-M3PRO',
'brand' => 'apple',
'category' => 'computers-laptop',
'price' => 2399.00,
'stock' => 11,
'short' => 'Portable creator laptop with Apple M3 Pro and mini-LED display.',
'description' => 'MacBook Pro 14 with M3 Pro, 18GB unified memory, 1TB SSD and Liquid Retina XDR display. Excellent for code, video editing, photo workflows and silent all-day performance.',
'days' => 10,
],
[
'name' => 'Dell Precision 5680 Mobile Workstation',
'sku' => 'LAP-DELL-PREC-5680',
'brand' => 'dell',
'category' => 'computers-laptop',
'price' => 3199.00,
'stock' => 6,
'short' => '16-inch workstation laptop for CAD and professional content creation.',
'description' => 'Precision 5680 with Intel Core i9, NVIDIA RTX 4000 Ada Generation Laptop GPU, 64GB DDR5 and 2TB NVMe storage. Designed for engineering, 3D rendering and production pipelines.',
'days' => 13,
],
[
'name' => 'HP ProLiant DL380 Gen11 (2U Server)',
'sku' => 'SRV-HP-DL380-G11',
'brand' => 'hp',
'category' => 'computers-server',
'price' => 4699.00,
'stock' => 4,
'short' => 'Dual-socket enterprise rack server for virtualization and databases.',
'description' => 'ProLiant DL380 Gen11 configured with dual Intel Xeon Silver processors, 128GB ECC RAM, redundant power supplies and remote management. Built for reliable datacenter deployment.',
'days' => 4,
],
[
'name' => 'Supermicro SYS-621C-TN12R',
'sku' => 'SRV-SMC-621C-TN12R',
'brand' => 'supermicro',
'category' => 'computers-server',
'price' => 5599.00,
'stock' => 3,
'short' => 'High-density server chassis with flexible storage and networking options.',
'description' => 'Supermicro 2U platform with Intel Xeon Scalable support, 12-bay NVMe/SATA front access and high-efficiency cooling. Suitable for private cloud, storage nodes and AI inference services.',
'days' => 8,
],
[
'name' => 'MSI MAG X670E Tomahawk WiFi',
'sku' => 'MB-MSI-X670E-TOMA',
'brand' => 'msi',
'category' => 'components-motherboard',
'price' => 299.00,
'stock' => 27,
'short' => 'ATX AM5 motherboard with PCIe 5.0 and strong VRM cooling.',
'description' => 'AM5 motherboard supporting Ryzen 7000/8000 processors, DDR5 memory, 2.5GbE LAN, Wi-Fi 6E, multiple M.2 slots and reinforced PCIe slot for high-end graphics cards.',
'days' => 5,
],
[
'name' => 'ASUS TUF Gaming B650-Plus WiFi',
'sku' => 'MB-ASUS-B650-TUF',
'brand' => 'asus',
'category' => 'components-motherboard',
'price' => 219.00,
'stock' => 31,
'short' => 'Reliable AM5 board with strong thermals for mainstream builds.',
'description' => 'TUF Gaming B650-Plus offers DDR5 support, PCIe 5.0 M.2, Wi-Fi 6, 2.5Gb Ethernet and robust power delivery. Great foundation for gaming and workstation rigs.',
'days' => 9,
],
[
'name' => 'Gigabyte Z790 AORUS Elite X AX',
'sku' => 'MB-GIGA-Z790-ELITEX',
'brand' => 'gigabyte',
'category' => 'components-motherboard',
'price' => 329.00,
'stock' => 19,
'short' => 'Intel LGA1700 board optimized for high-frequency DDR5 and I/O.',
'description' => 'Z790 AORUS Elite X with advanced VRM, DDR5 overclocking support, Wi-Fi 6E and multiple Gen4 M.2 slots. Ideal for 14th-gen Intel performance builds.',
'days' => 15,
],
[
'name' => 'MSI GeForce RTX 4070 SUPER Ventus 2X OC 12GB',
'sku' => 'GPU-MSI-RTX4070S-V2X',
'brand' => 'msi',
'category' => 'components-graphicscard',
'price' => 649.00,
'stock' => 16,
'short' => 'Efficient 1440p gaming GPU with DLSS 3 frame generation.',
'description' => 'Factory-overclocked RTX 4070 SUPER with dual-fan cooler, 12GB GDDR6X and AV1 encode. Excellent choice for high-refresh 1440p gaming and creator workflows.',
'days' => 2,
],
[
'name' => 'ASUS ProArt GeForce RTX 4080 SUPER OC 16GB',
'sku' => 'GPU-ASUS-RTX4080S-PA',
'brand' => 'asus',
'category' => 'components-graphicscard',
'price' => 1199.00,
'stock' => 9,
'short' => 'Creator-focused RTX 4080 SUPER with compact professional design.',
'description' => 'ProArt RTX 4080 SUPER features premium cooling, studio-ready reliability and strong ray tracing performance for 3D, AI-assisted workflows and 4K editing.',
'days' => 6,
],
[
'name' => 'Sapphire Pulse Radeon RX 7800 XT 16GB',
'sku' => 'GPU-SAPP-RX7800XT-P',
'brand' => 'sapphire',
'category' => 'components-graphicscard',
'price' => 519.00,
'stock' => 18,
'short' => 'Value 1440p GPU with 16GB VRAM and modern media engine.',
'description' => 'Radeon RX 7800 XT with robust dual-fan cooler, DisplayPort 2.1 support and competitive rasterization performance for high-quality 1440p gaming.',
'days' => 11,
],
[
'name' => 'Corsair Vengeance DDR5 32GB (2x16) 6000 CL30',
'sku' => 'RAM-COR-VENG-32-6000',
'brand' => 'corsair',
'category' => 'components-memory',
'price' => 129.00,
'stock' => 42,
'short' => 'Low-latency DDR5 kit tuned for modern gaming platforms.',
'description' => '32GB DDR5 dual-channel kit rated at 6000 MT/s CL30. Delivers strong gaming and productivity performance while maintaining broad motherboard compatibility.',
'days' => 4,
],
[
'name' => 'G.Skill Trident Z5 RGB DDR5 64GB (2x32) 6400 CL32',
'sku' => 'RAM-GSK-TZ5-64-6400',
'brand' => 'g-skill',
'category' => 'components-memory',
'price' => 289.00,
'stock' => 15,
'short' => 'High-capacity DDR5 kit for creators and workstation users.',
'description' => '64GB Trident Z5 RGB memory with 6400 MT/s profile and premium heat spreaders. Great for large Adobe projects, virtualization and heavy multitasking.',
'days' => 12,
],
[
'name' => 'Kingston FURY Beast DDR5 32GB (2x16) 5600',
'sku' => 'RAM-KIN-FURY-32-5600',
'brand' => 'kingston',
'category' => 'components-memory',
'price' => 109.00,
'stock' => 37,
'short' => 'Reliable DDR5 memory kit for balanced everyday performance.',
'description' => 'Kingston FURY Beast DDR5 provides stable operation, broad compatibility and sensible pricing for mainstream desktop builds.',
'days' => 16,
],
[
'name' => 'Samsung 990 PRO 2TB NVMe PCIe 4.0 SSD',
'sku' => 'SSD-SAM-990PRO-2TB',
'brand' => 'samsung',
'category' => 'components-harddrives-ssd',
'price' => 169.00,
'stock' => 33,
'short' => 'Flagship PCIe 4.0 SSD with sustained high random performance.',
'description' => 'Samsung 990 PRO 2TB delivers fast game loads, responsive creative workflows and excellent endurance with advanced thermal control.',
'days' => 1,
],
[
'name' => 'WD Black SN850X 1TB NVMe SSD',
'sku' => 'SSD-WD-SN850X-1TB',
'brand' => 'western-digital',
'category' => 'components-harddrives-ssd',
'price' => 99.00,
'stock' => 45,
'short' => 'High-speed NVMe SSD built for gaming and productivity.',
'description' => 'WD Black SN850X 1TB offers strong read/write throughput, low latency and reliable firmware support for modern desktop and laptop upgrades.',
'days' => 6,
],
[
'name' => 'Crucial T500 2TB PCIe 4.0 NVMe SSD',
'sku' => 'SSD-CRU-T500-2TB',
'brand' => 'crucial',
'category' => 'components-harddrives-ssd',
'price' => 154.00,
'stock' => 29,
'short' => 'Fast value SSD with strong everyday and workstation performance.',
'description' => 'Crucial T500 2TB combines excellent random read performance with dependable thermals for gaming libraries and creator project files.',
'days' => 14,
],
[
'name' => 'Seagate IronWolf 8TB NAS HDD',
'sku' => 'HDD-SEA-IW-8TB',
'brand' => 'seagate',
'category' => 'components-harddrives-mechanical',
'price' => 189.00,
'stock' => 21,
'short' => 'NAS-grade hard drive for always-on multi-bay systems.',
'description' => 'IronWolf 8TB 7200RPM drive designed for RAID arrays and home lab storage servers with vibration tolerance and sustained throughput.',
'days' => 9,
],
[
'name' => 'WD Red Plus 6TB NAS HDD',
'sku' => 'HDD-WD-REDP-6TB',
'brand' => 'western-digital',
'category' => 'components-harddrives-mechanical',
'price' => 149.00,
'stock' => 24,
'short' => 'Trusted CMR NAS drive for backups and media servers.',
'description' => 'WD Red Plus 6TB offers reliable 24/7 operation in NAS environments and is well suited for data archival and Plex deployments.',
'days' => 17,
],
[
'name' => 'Toshiba N300 4TB NAS HDD',
'sku' => 'HDD-TOS-N300-4TB',
'brand' => 'toshiba',
'category' => 'components-harddrives-mechanical',
'price' => 109.00,
'stock' => 26,
'short' => 'Entry NAS HDD with stable throughput and low noise profile.',
'description' => 'Toshiba N300 4TB provides dependable rotating storage for home NAS use with CMR recording and durable mechanics.',
'days' => 21,
],
[
'name' => 'Keychron K8 Pro Wireless Mechanical Keyboard',
'sku' => 'KEY-KCH-K8PRO',
'brand' => 'keychron',
'category' => 'accessories-keyboard',
'price' => 119.00,
'stock' => 35,
'short' => 'Hot-swappable 75% keyboard with Bluetooth and VIA support.',
'description' => 'Keychron K8 Pro features gasket-like typing feel, per-key programmability and tri-mode connectivity for office and developer setups.',
'days' => 5,
],
[
'name' => 'Logitech MX Keys S',
'sku' => 'KEY-LOG-MXKEYS-S',
'brand' => 'logitech',
'category' => 'accessories-keyboard',
'price' => 109.00,
'stock' => 40,
'short' => 'Low-profile productivity keyboard with multi-device pairing.',
'description' => 'MX Keys S offers quiet tactile keys, USB-C charging and seamless switching across up to three devices for professional workflows.',
'days' => 8,
],
[
'name' => 'Razer Huntsman V3 Pro TKL',
'sku' => 'KEY-RAZ-HV3P-TKL',
'brand' => 'razer',
'category' => 'accessories-keyboard',
'price' => 219.00,
'stock' => 12,
'short' => 'Tournament-ready optical keyboard with adjustable actuation.',
'description' => 'Huntsman V3 Pro TKL uses analog optical switches, rapid trigger support and low-latency polling for highly competitive gaming.',
'days' => 19,
],
[
'name' => 'Logitech G Pro X Superlight 2',
'sku' => 'MOU-LOG-GPXSL2',
'brand' => 'logitech',
'category' => 'accessories-mouse',
'price' => 159.00,
'stock' => 32,
'short' => 'Ultra-lightweight esports mouse with HERO 2 sensor.',
'description' => 'G Pro X Superlight 2 combines low weight, excellent battery life and precise tracking for FPS and competitive game performance.',
'days' => 3,
],
[
'name' => 'Razer DeathAdder V3 Pro',
'sku' => 'MOU-RAZ-DAV3PRO',
'brand' => 'razer',
'category' => 'accessories-mouse',
'price' => 139.00,
'stock' => 28,
'short' => 'Ergonomic wireless gaming mouse with flagship optical sensor.',
'description' => 'DeathAdder V3 Pro delivers strong ergonomics, smooth PTFE feet and responsive wireless performance suitable for extended sessions.',
'days' => 7,
],
[
'name' => 'SteelSeries Aerox 5 Wireless',
'sku' => 'MOU-SS-AEROX5W',
'brand' => 'steelseries',
'category' => 'accessories-mouse',
'price' => 119.00,
'stock' => 18,
'short' => 'Lightweight multi-genre mouse with customizable side controls.',
'description' => 'Aerox 5 Wireless balances speed and flexibility with multiple programmable inputs and long battery life.',
'days' => 18,
],
[
'name' => 'Elgato Stream Deck MK.2',
'sku' => 'STR-ELG-SDMK2',
'brand' => 'elgato',
'category' => 'accessories-streaming',
'price' => 149.00,
'stock' => 22,
'short' => '15-key macro control pad for streaming and production shortcuts.',
'description' => 'Stream Deck MK.2 provides customizable keys, multi-action macros and plugin integrations for OBS, Discord, Adobe tools and more.',
'days' => 6,
],
[
'name' => 'Shure MV7 USB/XLR Podcast Microphone',
'sku' => 'STR-SHU-MV7',
'brand' => 'shure',
'category' => 'accessories-streaming',
'price' => 249.00,
'stock' => 10,
'short' => 'Hybrid USB/XLR dynamic microphone for podcast and streaming audio.',
'description' => 'Shure MV7 offers voice isolation technology, touch controls and dual output options for growing content setups and home studios.',
'days' => 13,
],
[
'name' => 'Logitech C922 Pro Stream Webcam',
'sku' => 'STR-LOG-C922',
'brand' => 'logitech',
'category' => 'accessories-streaming',
'price' => 89.00,
'stock' => 30,
'short' => 'Full HD streaming webcam with autofocus and low-light tuning.',
'description' => 'C922 captures smooth 1080p video and performs well in typical desk lighting conditions for meetings, classes and livestreaming.',
'days' => 20,
],
[
'name' => 'Peak Design Everyday Backpack 20L v2',
'sku' => 'BAG-PKD-EDB-20L',
'brand' => 'peak-design',
'category' => 'accessories-bags',
'price' => 279.00,
'stock' => 8,
'short' => 'Premium weatherproof backpack for laptop and camera carry.',
'description' => 'Everyday Backpack 20L v2 features flexible internal dividers, quick side access and durable recycled shell fabrics for commuters and creators.',
'days' => 22,
],
[
'name' => 'Lenovo 15.6-inch Urban B730 Backpack',
'sku' => 'BAG-LEN-URBAN-B730',
'brand' => 'lenovo',
'category' => 'accessories-bags',
'price' => 69.00,
'stock' => 17,
'short' => 'Minimal commuter backpack with dedicated laptop protection.',
'description' => 'Urban B730 includes padded laptop sleeve, organized accessory compartments and lightweight weather-resistant exterior.',
'days' => 25,
],
[
'name' => 'Alienware AW3423DWF 34-inch QD-OLED Monitor',
'sku' => 'MON-AW-AW3423DWF',
'brand' => 'alienware',
'category' => 'monitor-gaming-monitors',
'price' => 879.00,
'stock' => 7,
'short' => 'Ultrawide QD-OLED monitor with excellent HDR gaming performance.',
'description' => '34-inch 3440x1440 QD-OLED panel with 165Hz refresh, deep contrast and fast response time. A standout display for immersive gaming and media.',
'days' => 2,
],
[
'name' => 'LG UltraGear 27GR95QE-B 27-inch OLED',
'sku' => 'MON-LG-27GR95QE',
'brand' => 'lg',
'category' => 'monitor-gaming-monitors',
'price' => 799.00,
'stock' => 9,
'short' => '240Hz OLED gaming monitor with deep blacks and instant response.',
'description' => 'LG UltraGear 27GR95QE-B combines 2560x1440 resolution, 240Hz refresh and OLED clarity for premium competitive and story-driven gaming.',
'days' => 11,
],
[
'name' => 'Samsung Odyssey G7 32-inch Curved QHD',
'sku' => 'MON-SAM-ODYS-G7-32',
'brand' => 'samsung',
'category' => 'monitor-gaming-monitors',
'price' => 549.00,
'stock' => 13,
'short' => 'High-refresh curved QHD monitor for fluid motion gaming.',
'description' => 'Odyssey G7 features 240Hz refresh, fast VA response and strong contrast with adaptive sync support for smooth gameplay.',
'days' => 18,
],
[
'name' => 'Ergotron LX Desk Monitor Arm',
'sku' => 'MNT-ERG-LX-DESK',
'brand' => 'ergotron',
'category' => 'monitor-mounting',
'price' => 199.00,
'stock' => 16,
'short' => 'Premium monitor arm with smooth adjustment and durable joints.',
'description' => 'Ergotron LX supports broad VESA compatibility and effortless positioning for ergonomic desk setups and standing workstations.',
'days' => 9,
],
[
'name' => 'VIVO Dual LCD Monitor Desk Mount STAND-V002',
'sku' => 'MNT-VIVO-V002',
'brand' => 'vivo',
'category' => 'monitor-mounting',
'price' => 59.00,
'stock' => 34,
'short' => 'Affordable dual-monitor mount for clean cable-managed desks.',
'description' => 'STAND-V002 supports two displays up to 27 inches and offers tilt, swivel and rotation adjustments for productive multi-screen work.',
'days' => 15,
],
[
'name' => 'BenQ ScreenBar Halo Monitor Light',
'sku' => 'MAC-BENQ-SBHALO',
'brand' => 'benq',
'category' => 'monitor-accessories',
'price' => 179.00,
'stock' => 20,
'short' => 'Monitor-mounted task light with wireless controller and backlight.',
'description' => 'ScreenBar Halo reduces eye strain by lighting desk space without screen glare and includes ambient rear fill lighting for late-night sessions.',
'days' => 8,
],
[
'name' => 'Datacolor Spyder X Pro Display Calibration Tool',
'sku' => 'MAC-DATA-SPYDERX',
'brand' => 'datacolor',
'category' => 'monitor-accessories',
'price' => 169.00,
'stock' => 12,
'short' => 'Fast color calibration solution for creators and photographers.',
'description' => 'Spyder X Pro helps maintain consistent display color and brightness for photo editing, print prep and multi-monitor workflows.',
'days' => 16,
],
[
'name' => 'Focusrite Scarlett 2i2 (4th Gen)',
'sku' => 'SND-FCS-SCAR-2I2-4G',
'brand' => 'focusrite',
'category' => 'components-soundcard',
'price' => 199.00,
'stock' => 14,
'short' => 'USB audio interface with premium preamps for home recording.',
'description' => 'Scarlett 2i2 4th Gen provides low-noise mic preamps, auto gain, clip safe and high-quality conversion for vocals, instruments and streaming.',
'days' => 12,
],
[
'name' => 'Creative Sound BlasterX G6 USB DAC',
'sku' => 'SND-CRTV-SBG6',
'brand' => 'creative',
'category' => 'components-soundcard',
'price' => 129.00,
'stock' => 19,
'short' => 'External DAC/amp with virtual surround and strong headphone drive.',
'description' => 'Sound BlasterX G6 improves desktop and console audio with high-resolution playback, game-chat mix controls and versatile connectivity.',
'days' => 23,
],
[
'name' => 'iFixit Pro Tech Toolkit',
'sku' => 'TLS-IFX-PRO-TECH',
'brand' => 'ifixit',
'category' => 'components-tools',
'price' => 74.95,
'stock' => 26,
'short' => 'Comprehensive precision toolkit for PC and electronics repairs.',
'description' => 'Pro Tech Toolkit includes precision bits, driver handle, tweezers, spudgers and opening tools trusted by technicians and repair enthusiasts.',
'days' => 4,
],
[
'name' => 'ARCTIC MX-6 Thermal Paste 8g',
'sku' => 'TLS-ARC-MX6-8G',
'brand' => 'arctic',
'category' => 'components-tools',
'price' => 9.99,
'stock' => 120,
'short' => 'High-performance thermal compound for CPUs and GPUs.',
'description' => 'MX-6 offers excellent thermal conductivity, easy application and long-term stability for air-cooled and liquid-cooled builds.',
'days' => 27,
],
];
foreach ($products as $product) {
$categoryId = $categoryIds->get($product['category']);
$brandId = $brandIds->get($product['brand']);
if (! is_int($categoryId) || ! is_int($brandId)) {
continue;
}
Product::query()->updateOrCreate(
['sku' => $product['sku']],
[
'category_id' => $categoryId,
'brand_id' => $brandId,
'name' => $product['name'],
'slug' => Str::slug($product['name'].'-'.$product['sku']),
'short_description' => $product['short'],
'description' => $product['description'],
'price' => $product['price'],
'stock_quantity' => $product['stock'],
'active' => true,
'published_at' => now()->subDays($product['days']),
],
);
}
}
}