Skip to content

Commit db8ff50

Browse files
author
Marco Bunge
committed
Add prefix support
1 parent 5681c85 commit db8ff50

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Gateway.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@ final class Gateway
3737
public function __construct(Connection $connection, $table, $alias = null)
3838
{
3939
$this->connection = $connection;
40-
$this->table = $table;
40+
$prefix = $connection->getPrefix();
41+
42+
// add prefix and reset prefix if prefix already set
43+
$this->table = $prefix . ltrim($table, $prefix);
4144
$this->alias = $alias;
4245
}
4346

0 commit comments

Comments
 (0)