32 lines
637 B
PHP
32 lines
637 B
PHP
|
<?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 [
|
||
|
'id' => $this->faker->unique()->uuid(),
|
||
|
'name' => $this->faker->productName(),
|
||
|
'description' => $this->faker->text(10000),
|
||
|
];
|
||
|
}
|
||
|
}
|