BF shop example command
This commit is contained in:
parent
af4f6b9fa6
commit
a0fcde8c3e
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue