2021-09-05 02:22:17 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Database\Factories;
|
|
|
|
|
|
|
|
use App\Models\Product;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
use illuminate\support\str;
|
|
|
|
|
|
|
|
class ProductFactory extends Factory
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* The name of the factory's corresponding model.
|
|
|
|
*
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $model = Product::class;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Define the model's default state.
|
|
|
|
*
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function definition()
|
|
|
|
{
|
|
|
|
return [
|
2021-10-28 11:19:42 +02:00
|
|
|
'uuid' => $this->faker->unique()->uuid(),
|
2021-09-05 02:22:17 +02:00
|
|
|
'name' => $this->faker->productName(),
|
2021-11-14 14:51:49 +01:00
|
|
|
'price' => $this->faker->numberBetween(1,32124),
|
2021-09-05 02:22:17 +02:00
|
|
|
'description' => $this->faker->text(10000),
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|