Skip to content

Commit d3c7cd4

Browse files
committed
Move DB facade import to file scope
1 parent 742bed9 commit d3c7cd4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/common/etc/entrypoint.d/lib/laravel/test-db-connection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
* @package serversideup/php
2121
*/
2222

23+
use Illuminate\Support\Facades\DB;
24+
2325
// Validate arguments
2426
if ($argc < 2 || $argc > 5) {
2527
fwrite(STDERR, "Usage: php test-db-connection.php /path/to/app/base/dir [migration_mode] [migration_isolation] [database_connection]\n");
@@ -80,8 +82,6 @@
8082

8183
// Test database connection
8284
try {
83-
use Illuminate\Support\Facades\DB;
84-
8585
// Use specific database connection if provided
8686
$connection = $databaseConnection ? DB::connection($databaseConnection) : DB::connection();
8787
$driver = $connection->getDriverName();

0 commit comments

Comments
 (0)