refactor: conditionally execute user and student seeders based on application environment
This commit is contained in:
parent
482cb9bd07
commit
050559048f
@ -14,12 +14,20 @@ class DatabaseSeeder extends Seeder
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
$this->call([
|
||||
ShieldSeeder::class,
|
||||
UserSeeder::class,
|
||||
StudentSeeder::class,
|
||||
CourseSeeder::class,
|
||||
CourseScheduleSeeder::class,
|
||||
]);
|
||||
if (! app()->isLocal()) {
|
||||
$this->call([
|
||||
ShieldSeeder::class,
|
||||
CourseSeeder::class,
|
||||
CourseScheduleSeeder::class,
|
||||
]);
|
||||
} else {
|
||||
$this->call([
|
||||
ShieldSeeder::class,
|
||||
UserSeeder::class,
|
||||
StudentSeeder::class,
|
||||
CourseSeeder::class,
|
||||
CourseScheduleSeeder::class,
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user