ldc-crm/database/factories/QuestionFactory.php
Jérémy Munsch 787ee5a4c5 - tag 2.0.1
- Add Questions segementation
- Fix Customer delete Tests
2021-08-11 17:37:59 +02:00

31 lines
609 B
PHP

<?php
namespace Database\Factories;
use App\Enums\QuestionType;
use App\Models\Question;
use Illuminate\Database\Eloquent\Factories\Factory;
class QuestionFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = Question::class;
/**
* Define the model's default state.
*
* @return array
*/
public function definition()
{
return [
'question' => $this->faker->realText(40),
'type' => collect(QuestionType::toArray())->random()->value,
];
}
}