*/ class CategoryFactory extends Factory { /** * Define the model's default state. * * @return array */ public function definition(): array { $name = $this->faker->unique()->word; return [ 'name' => ucfirst($name), 'slug' => Str::slug($name), 'description' => $this->faker->paragraph, 'short_description' => $this->faker->sentence, 'image' => $this->faker->imageUrl(640, 480, 'business', true), ]; } }