*/ class CategoryFactory extends Factory { /** * The name of the factory's corresponding model. * * @var class-string */ protected $model = Category::class; /** * Define the model's default state. * * @return array */ public function definition(): array { return [ 'name' => fake()->unique()->word(), 'slug' => fake()->unique()->slug(2), 'description' => fake()->sentence(), ]; } }