ldc-portsalaries/database/factories/SondageFactory.php

33 lines
618 B
PHP
Raw Normal View History

2021-05-08 06:50:19 +02:00
<?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)
];
}
}