We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents fa578bb + e5f2495 commit d31e11aCopy full SHA for d31e11a
src/app/Models/Traits/HasRelationshipFields.php
@@ -4,7 +4,6 @@
4
5
use DB;
6
use Illuminate\Database\Eloquent\Model;
7
-use Illuminate\Support\Facades\Config;
8
9
/*
10
|--------------------------------------------------------------------------
@@ -39,7 +38,7 @@ public function getConnectionWithExtraTypeMappings()
39
38
*/
40
public function getTableWithPrefix()
41
{
42
- $prefix = Config::get('database.connections.'.$this->getConnectionName().'.prefix');
+ $prefix = $this->getConnection()->getTablePrefix();
43
$tableName = $this->getTable();
44
45
return $prefix.$tableName;
0 commit comments