Skip to content

Commit d31e11a

Browse files
authored
Merge pull request #3126 from mgralikowski/patch-11
Update HasRelationshipFields.php
2 parents fa578bb + e5f2495 commit d31e11a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/app/Models/Traits/HasRelationshipFields.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
use DB;
66
use Illuminate\Database\Eloquent\Model;
7-
use Illuminate\Support\Facades\Config;
87

98
/*
109
|--------------------------------------------------------------------------
@@ -39,7 +38,7 @@ public function getConnectionWithExtraTypeMappings()
3938
*/
4039
public function getTableWithPrefix()
4140
{
42-
$prefix = Config::get('database.connections.'.$this->getConnectionName().'.prefix');
41+
$prefix = $this->getConnection()->getTablePrefix();
4342
$tableName = $this->getTable();
4443

4544
return $prefix.$tableName;

0 commit comments

Comments
 (0)