Skip to content

Commit e2c6258

Browse files
authored
Fix Laravel 12 Schema::connection() compatibility (#1)
1 parent f75070d commit e2c6258

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

migrations/2024_01_01_000000_create_developer_logs_table.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public function up(): void
1414
$tableName = config('devlogger.table_name', 'developer_logs');
1515
$connection = config('devlogger.database_connection', null);
1616

17-
$schema = $connection ? Schema::connection($connection) : Schema::connection();
17+
$schema = $connection ? Schema::connection($connection) : Schema;
1818

1919
$schema->create($tableName, function (Blueprint $table) {
2020
$table->id();
@@ -52,7 +52,7 @@ public function down(): void
5252
$tableName = config('devlogger.table_name', 'developer_logs');
5353
$connection = config('devlogger.database_connection', null);
5454

55-
$schema = $connection ? Schema::connection($connection) : Schema::connection();
55+
$schema = $connection ? Schema::connection($connection) : Schema;
5656

5757
$schema->dropIfExists($tableName);
5858
}

0 commit comments

Comments
 (0)