feat: Differentiate database seeding for production and staging environments and set a voucher's user limit to 1.
This commit is contained in:
parent
610db296f0
commit
6706c191ed
@ -8,7 +8,13 @@ class DatabaseSeeder extends Seeder
|
|||||||
{
|
{
|
||||||
public function run(): void
|
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([
|
$this->call([
|
||||||
RolePermissionSeeder::class,
|
RolePermissionSeeder::class,
|
||||||
WarehouseSeeder::class,
|
WarehouseSeeder::class,
|
||||||
|
|||||||
@ -123,7 +123,7 @@ public function run(): void
|
|||||||
'min_purchase' => 50000,
|
'min_purchase' => 50000,
|
||||||
'max_discount' => 25000,
|
'max_discount' => 25000,
|
||||||
'quota' => null,
|
'quota' => null,
|
||||||
'limit_per_user' => null,
|
'limit_per_user' => 1,
|
||||||
'start_date' => now(),
|
'start_date' => now(),
|
||||||
'end_date' => null,
|
'end_date' => null,
|
||||||
],
|
],
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user