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