feat: Differentiate database seeding for production and staging environments and set a voucher's user limit to 1.

This commit is contained in:
Yoga Pangestu 2026-01-06 20:00:19 +07:00
parent 610db296f0
commit 6706c191ed
2 changed files with 8 additions and 2 deletions

View File

@ -8,7 +8,13 @@ class DatabaseSeeder extends Seeder
{
public function run(): void
{
if (app()->environment(['staging', 'production'])) {
if (app()->environment(['production'])) {
$this->call([
RolePermissionSeeder::class,
WarehouseSeeder::class,
TierSeeder::class,
]);
} elseif (app()->environment(['staging'])) {
$this->call([
RolePermissionSeeder::class,
WarehouseSeeder::class,

View File

@ -123,7 +123,7 @@ public function run(): void
'min_purchase' => 50000,
'max_discount' => 25000,
'quota' => null,
'limit_per_user' => null,
'limit_per_user' => 1,
'start_date' => now(),
'end_date' => null,
],