From ab64f689cd0d912a7f468128dea5b6640de5c54b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20P=C3=B6schl?= Date: Sat, 23 Dec 2023 23:38:00 +0000 Subject: [PATCH] Make sure, that dummy data is only seeded when APP_ENV is not production --- database/seeders/DatabaseSeeder.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php index 8c24650..92835be 100644 --- a/database/seeders/DatabaseSeeder.php +++ b/database/seeders/DatabaseSeeder.php @@ -19,9 +19,13 @@ public function run(): void // 'email' => 'test@example.com', // ]); $this->call([UserSeeder::class]); - $this->call([RevenueSeeder::class]); $this->call([CostTypeSeeder::class]); - $this->call([ExpenseSeeder::class]); - $this->call([TravelAllowanceSeeder::class]); + if (! app()->environment('production')) { + $this->call([ + RevenueSeeder::class, + ExpenseSeeder::class, + TravelAllowanceSeeder::class, + ]); + } } }