Skip to content

Commit 895170c

Browse files
authored
Update HasRelationshipFields.php
Fix method (for now return only table name w/t prefix)
1 parent e977d53 commit 895170c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/app/Models/Traits/HasRelationshipFields.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function getConnectionWithExtraTypeMappings()
3939
*/
4040
public function getTableWithPrefix()
4141
{
42-
$prefix = Config::get('database.connections.'.$this->getConnectionName().'.prefix');
42+
$prefix = $this->getConnection()->getTablePrefix();
4343
$tableName = $this->getTable();
4444

4545
return $prefix.$tableName;

0 commit comments

Comments
 (0)