- menyesuaikan model jika ada yang salah seperti kurangnya trait SoftDeletes, casting yang salah, relasi yang kurang dan lainnya - memperbaiki enum di migrasi
23 lines
489 B
PHP
23 lines
489 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\Bottle;
|
|
use App\Models\BottleOutlet;
|
|
use App\Models\Outlet;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
class BottleOutletFactory extends Factory
|
|
{
|
|
protected $model = BottleOutlet::class;
|
|
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'bottle_id' => Bottle::factory(),
|
|
'outlet_id' => Outlet::factory(),
|
|
'stock' => $this->faker->numberBetween(0, 200),
|
|
];
|
|
}
|
|
}
|