32 lines
618 B
PHP
32 lines
618 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Enums\TypeSondage;
|
|
use App\Models\Sondage;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
class SondageFactory extends Factory
|
|
{
|
|
|
|
/**
|
|
* The name of the factory's corresponding model.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $model = Sondage::class;
|
|
|
|
/**
|
|
* Define the model's default state.
|
|
*
|
|
* @return array
|
|
*/
|
|
public function definition()
|
|
{
|
|
return [
|
|
'type' => TypeSondage::make(rand(0, 1)),
|
|
'question' => $this->faker->sentence(),
|
|
'status' => rand(0, 1)
|
|
];
|
|
}
|
|
}
|