You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
755 B
PHP
24 lines
755 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\OrderProduct;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
use Illuminate\Support\Carbon;
|
|
|
|
class OrderProductFactory extends Factory
|
|
{
|
|
protected $model = OrderProduct::class;
|
|
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'created_at' => Carbon::now(),
|
|
'updated_at' => Carbon::now(),
|
|
'sku' => $this->faker->randomElement([$this->faker->randomNumber(4, true), null]),
|
|
'product_name' => $this->faker->randomElement(['shirts', 'hats', 'jackets', 'pants', 'tote bags', 'backpacks']),
|
|
'color' => $this->faker->randomElement(['black', 'white', 'navy', 'red', 'gold', 'charcoal']),
|
|
];
|
|
}
|
|
}
|