Skip to content

Commit dda9e5b

Browse files
authored
feat: add driver option to sync-index-settings command (#940)
1 parent 2301792 commit dda9e5b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Console/SyncIndexSettingsCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class SyncIndexSettingsCommand extends Command
1818
*
1919
* @var string
2020
*/
21-
protected $signature = 'scout:sync-index-settings';
21+
protected $signature = 'scout:sync-index-settings {--driver= : The name of the search engine driver (Defaults to configuration value: `scout.driver`)}';
2222

2323
/**
2424
* The console command description.
@@ -35,9 +35,9 @@ class SyncIndexSettingsCommand extends Command
3535
*/
3636
public function handle(EngineManager $manager)
3737
{
38-
$engine = $manager->engine();
38+
$driver = $this->option('driver') ?: config('scout.driver');
3939

40-
$driver = config('scout.driver');
40+
$engine = $manager->engine($driver);
4141

4242
if (! $engine instanceof UpdatesIndexSettings) {
4343
return $this->error('The "'.$driver.'" engine does not support updating index settings.');

0 commit comments

Comments
 (0)