finishes 13 and 14
This commit is contained in:
31
database/factories/QuestionGroupFactory.php
Normal file
31
database/factories/QuestionGroupFactory.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\Category;
|
||||
use App\Models\QuestionGroup;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* Factory for generating QuestionGroup test data.
|
||||
*
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\QuestionGroup>
|
||||
*/
|
||||
final class QuestionGroupFactory extends Factory
|
||||
{
|
||||
protected $model = QuestionGroup::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'category_id' => Category::factory(),
|
||||
'name' => fake()->words(3, true),
|
||||
'sort_order' => fake()->numberBetween(0, 10),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user