ldc-tousenselle/database/factories/EanCodeFactory.php
Jérémy Munsch f7a3f5d5f9 first draw
2021-06-14 09:34:42 +02:00

31 lines
594 B
PHP

<?php
namespace Database\Factories;
use App\Models\EanCode;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;
class EanCodeFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = EanCode::class;
/**
* Define the model's default state.
*
* @return array
*/
public function definition()
{
return [
'ean' => intval($this->faker->unique()->ean13()),
'name' => $this->faker->unique()->word()
];
}
}