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
|
public function run(): void
|
||||||
{
|
{
|
||||||
$this->call([
|
if (! app()->isLocal()) {
|
||||||
ShieldSeeder::class,
|
$this->call([
|
||||||
UserSeeder::class,
|
ShieldSeeder::class,
|
||||||
StudentSeeder::class,
|
CourseSeeder::class,
|
||||||
CourseSeeder::class,
|
CourseScheduleSeeder::class,
|
||||||
CourseScheduleSeeder::class,
|
]);
|
||||||
]);
|
} else {
|
||||||
|
$this->call([
|
||||||
|
ShieldSeeder::class,
|
||||||
|
UserSeeder::class,
|
||||||
|
StudentSeeder::class,
|
||||||
|
CourseSeeder::class,
|
||||||
|
CourseScheduleSeeder::class,
|
||||||
|
]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user