Skip to content

Commit

Permalink
Fix Database Connection (#26)
Browse files Browse the repository at this point in the history
* Fix Database Connection

* Fix the indentation

* Fix the indentation #2
  • Loading branch information
marcheffels authored and acasar committed Dec 5, 2018
1 parent c2aea31 commit 98c494a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/Translatable.php
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ public function translations()
public function translationModel()
{
$translation = new TranslationModel();
$translation->setConnection($this->getI18nConnection());
$translation->setTable($this->getI18nTable());
$translation->setKeyName($this->getForeignKey());
$translation->setLocaleKey($this->getLocaleKey());
Expand Down Expand Up @@ -442,6 +443,16 @@ public function getWithFallback()
return TranslatableConfig::withFallback();
}

/**
* Get the i18n connection name associated with the model.
*
* @return string
*/
public function getI18nConnection()
{
return $this->getConnectionName();
}

/**
* Get the i18n table associated with the model.
*
Expand Down

0 comments on commit 98c494a

Please sign in to comment.