Skip to content
This repository has been archived by the owner on Jan 9, 2024. It is now read-only.

Commit

Permalink
Resolves #8
Browse files Browse the repository at this point in the history
  • Loading branch information
damiantw committed Nov 16, 2016
1 parent ec5dcea commit 58aae1e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Services/ModelService.php
Expand Up @@ -23,9 +23,10 @@ public function setModel($model)

$this->model = $model;

$this->connectionName = $modelInstance->getConnectionName();
$this->connectionName = $modelInstance->getConnectionName() !== null ?
$modelInstance->getConnectionName() : config('database.default');

$this->tableName = $modelInstance->getTable();
$this->tableName = config("database.connections.$this->connectionName.prefix", '').$modelInstance->getTable();

$this->indexName = $modelInstance->searchableAs();

Expand Down

0 comments on commit 58aae1e

Please sign in to comment.