BF shop example command

This commit is contained in:
a6a2f5842 2025-11-21 16:11:43 +01:00
parent af4f6b9fa6
commit a0fcde8c3e
2 changed files with 2 additions and 0 deletions

View File

@ -15,6 +15,7 @@ class ProductFactory extends Factory
$name = $this->faker->words(3, true);
return [
'name' => ucfirst($name),
'slug' => Str::slug($name),
'sku' => strtoupper($this->faker->bothify('??-####')),
'type' => 'simple',

View File

@ -126,6 +126,7 @@ class ShopAddExampleProducts extends Command
$onSale = $this->faker->boolean(30); // 30% chance of being on sale
$product = Product::create([
'name' => $productName,
'slug' => $slug,
'sku' => 'EX-' . strtoupper($this->faker->bothify('??-####')),
'type' => $type,