Skip to content
This repository was archived by the owner on Nov 4, 2021. It is now read-only.

Commit 547bbbf

Browse files
committed
Added prefix support to index name
1 parent 91a1e1b commit 547bbbf

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/IndexConfigurator.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ abstract class IndexConfigurator
1212

1313
protected $defaultMapping = [];
1414

15+
/**
16+
* @return string
17+
*/
1518
public function getName()
1619
{
17-
if (isset($this->name)) {
18-
return $this->name;
19-
}
20-
21-
return Str::snake(str_replace('IndexConfigurator', '', class_basename($this)));
20+
$name = $this->name ?? Str::snake(str_replace('IndexConfigurator', '', class_basename($this)));
21+
return config('scout.prefix') . $name;
2222
}
2323

2424
public function getSettings()

0 commit comments

Comments
 (0)