27 lines
681 B
PHP
27 lines
681 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
/**
|
|
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Product>
|
|
*/
|
|
class ProductFactory extends Factory
|
|
{
|
|
/**
|
|
* Define the model's default state.
|
|
*
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'name' => 'product ' . \fake()->jobTitle(),
|
|
// * EAN 13 generate
|
|
'code_ean' => fake()->randomNumber(8, true) . fake()->randomNumber(5, true),
|
|
'picture_alt' => fake()->sentence(),
|
|
'picture_title' => fake()->sentence(),
|
|
];
|
|
}
|
|
}
|