summaryrefslogtreecommitdiff
path: root/workbench/database/factories/CategoryFactory.php
blob: 756c22af178a531e7be910178ae76b14875cbbca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php

namespace Workbench\Database\Factories;

use Illuminate\Database\Eloquent\Factories\Factory;
use Workbench\App\Models\Category;

/**
 * @template TModel of \Workbench\App\Models\Category
 *
 * @extends \Illuminate\Database\Eloquent\Factories\Factory<TModel>
 */
class CategoryFactory extends Factory
{
    /**
     * The name of the factory's corresponding model.
     *
     * @var class-string<TModel>
     */
    protected $model = Category::class;

    /**
     * Define the model's default state.
     *
     * @return array<string, mixed>
     */
    public function definition(): array
    {
        return [
            'name' => fake()->text(20),
        ];
    }
}