Skip to content

Commit

Permalink
fix(core): respect table prefix config in search index
Browse files Browse the repository at this point in the history
  • Loading branch information
yusufkandemir committed Sep 4, 2024
1 parent 2b31dca commit e159006
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/core/src/Search/ScoutIndexer.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ class ScoutIndexer implements ScoutIndexerInterface
{
public function searchableAs(Model $model): string
{
$name = str_replace('lunar_', '', $model->getTable());
$tablePrefix = config('lunar.database.table_prefix');
$name = str_replace($tablePrefix, '', $model->getTable());

return config('scout.prefix').$name;
}
Expand Down

0 comments on commit e159006

Please sign in to comment.