Skip to content

Commit 691fff3

Browse files
marcoocramroshangautam
authored andcommitted
fix(model) : don't concatenate table prefixes recursively
resolves #122
1 parent 90fafcb commit 691fff3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/TotemModel.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ class TotemModel extends Model
1111
*/
1212
public function getTable()
1313
{
14+
if (str_contains(parent::getTable(), config('totem.table_prefix'))) {
15+
return parent::getTable();
16+
}
17+
1418
return config('totem.table_prefix').parent::getTable();
1519
}
1620
}

0 commit comments

Comments
 (0)