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.
25 lines
757 B
PHTML
25 lines
757 B
PHTML
3 months ago
|
<?php
|
||
|
|
||
|
namespace Database\Factories;
|
||
|
|
||
|
use App\Models\Order;
|
||
|
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']),
|
||
|
];
|
||
|
}
|
||
|
}
|