| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 25 | public function handle(): void |
||
| 26 | { |
||
| 27 | $command = $this; |
||
| 28 | $searchableList = collect($command->argument('searchable'))->whenEmpty(function () { |
||
| 29 | $factory = new SearchableListFactory(app()->getNamespace(), app()->path()); |
||
| 30 | |||
| 31 | return $factory->make(); |
||
| 32 | }); |
||
| 33 | $searchableList->each(function ($searchable) { |
||
| 34 | $searchable::removeAllFromSearch(); |
||
| 35 | $doneMessage = trans('scout::flush.done', [ |
||
| 36 | 'searchable' => $searchable, |
||
| 37 | ]); |
||
| 38 | $this->output->success($doneMessage); |
||
| 39 | }); |
||
| 42 |