$this->faker->unique()->words(rand(2, 8), true) ]); } $caliber = []; for ($jj = 1; $jj <= 4; $jj++) { array_push($caliber, [ "value" => $this->faker->unique()->words(rand(2, 8), true) ]); } $nutritionnal_values = []; for ($jj = 1; $jj <= 9; $jj++) { array_push($nutritionnal_values, [ "label" => $this->faker->unique()->words(rand(2, 8), true), "value" => $this->faker->numberBetween(6, 30) ]); } $label = $this->faker->unique()->words(rand(2, 4), true); return [ 'label' => $label, 'slug' => Str::slug($label), 'seo_title' => $this->faker->words(8, true), 'seo_description' => $this->faker->words(25, true), 'species' => collect(ProductSpeciesEnum::toArray())->random(), 'nutriscore' => collect(NutriscoreEnum::toArray())->random(), 'sticker_sm_title' => $this->faker->words(5, true), 'sticker_sm_alt' => $this->faker->words(8, true), 'packaging' => $packaging, 'caliber' => $caliber, 'nutritionnal_values' => $nutritionnal_values, 'ingredients' => $this->faker->unique()->words(rand(15, 25), true), 'advantage' => $this->faker->unique()->words(rand(15, 25), true), 'preparation' => $this->faker->unique()->words(rand(15, 25), true), 'is_frenchpoultry' => $this->faker->boolean(75), 'is_vip' => $this->faker->boolean(25), 'is_egalim' => $this->faker->boolean(25), 'status' => $this->faker->boolean(75) ]; } }