Skip to content

Commit 050df53

Browse files
committed
fix: connection when fetching table columns
1 parent ce01de5 commit 050df53

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/SQLLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public function into(
100100
public function createColumnsFromHeaders(string $table, array $columns): array
101101
{
102102
$columns = array_map('strtolower', $columns);
103-
$schemaColumns = collect(Schema::connection(config('sql-loader.connection'))->getColumns($table));
103+
$schemaColumns = collect(Schema::connection($this->getConnection())->getColumns($table));
104104

105105
$dates = $schemaColumns->filter(fn ($column) => in_array($column['type'], [
106106
'date',

0 commit comments

Comments
 (0)