diff --git a/database/factories/BottleFactory.php b/database/factories/BottleFactory.php index c110785..d2a84a3 100644 --- a/database/factories/BottleFactory.php +++ b/database/factories/BottleFactory.php @@ -11,12 +11,15 @@ class BottleFactory extends Factory { public function definition(): array { + $costPrice = $this->faker->randomNumber(2); + return [ 'name' => $this->faker->word(), 'slug' => $this->faker->slug(), 'size' => $this->faker->randomNumber(2), 'cost_price' => $this->faker->randomNumber(2), 'sale_price' => $this->faker->randomNumber(2), + 'point_per_pcs' => round($costPrice / 100), 'description' => $this->faker->sentence(), ]; }