faker->unique()->words(2, true); return [ 'brand_id' => Brand::factory(), 'name' => Str::title($name), 'slug' => Str::slug($name.'-'.$this->faker->unique()->randomNumber()), 'concentration' => $this->faker->randomElement(Concentration::cases()), 'cost_price' => $this->faker->numberBetween(50000, 250000), 'sale_price' => $this->faker->numberBetween(80000, 400000), ]; } public function withNotes(): Factory { return $this->state(fn () => [ 'base_notes' => $this->faker->words(3, true), 'middle_notes' => $this->faker->words(3, true), 'top_notes' => $this->faker->words(3, true), ]); } public function withDescription(): Factory { return $this->state(fn () => ['description' => $this->faker->paragraph()]); } public function withoutBrand(): Factory { return $this->state(fn () => ['brand_id' => null]); } public function extrait(): Factory { return $this->state(fn () => ['concentration' => Concentration::EXTRAIT_DE_PERFUME]); } public function eauDeParfum(): Factory { return $this->state(fn () => ['concentration' => Concentration::EAU_DE_PERFUME]); } }