Skip to content

Commit 33f9040

Browse files
committed
add prefix to table name
1 parent 84f6dc6 commit 33f9040

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Console/ImportCommand.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,11 @@ public function handle(Dispatcher $events)
3434
$class = $this->argument('model');
3535

3636
$model = new $class();
37-
$tnt = new TNTSearch();
37+
$tnt = new TNTSearch();
3838
$driver = $model->getConnectionName() ?: config('database.default');
3939
$config = config('scout.tntsearch') + config("database.connections.$driver");
40+
$tablePrefix = $config['prefix'] ?? '';
41+
$tableName = $tablePrefix.$model->getTable();
4042

4143
$tnt->loadConfig($config);
4244
$tnt->setDatabaseHandle(app('db')->connection($driver)->getPdo());

0 commit comments

Comments
 (0)