| Conditions | 3 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3.0123 |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | 17 | public function handle() |
|
| 30 | { |
||
| 31 | 17 | if (!$this->confirmToProceed()) { |
|
| 32 | return; |
||
| 33 | } |
||
| 34 | |||
| 35 | 17 | $this->resolver->setDefaultConnection($this->getDatabase()); |
|
| 36 | |||
| 37 | Model::unguarded(function () { |
||
| 38 | 17 | foreach ($this->getSeeders() as $seeder) { |
|
| 39 | 17 | $seeder = $this->laravel->make($seeder); |
|
| 40 | 17 | $seeder->__invoke(); |
|
| 41 | } |
||
| 42 | 17 | }); |
|
| 43 | |||
| 44 | 17 | $this->info('Database seeding completed successfully.'); |
|
| 45 | 17 | } |
|
| 54 |