Skip to content

Commit bb50cd8

Browse files
authored
Use default database connection from config (#312)
* use default database connection from config * Remove unused use statement
1 parent 7d05f82 commit bb50cd8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Providers/TotemServiceProvider.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
use Cron\CronExpression;
66
use Illuminate\Http\UploadedFile;
7-
use Illuminate\Support\Facades\Schema;
87
use Illuminate\Support\Facades\Validator;
98
use Illuminate\Support\ServiceProvider;
109
use Studio\Totem\Console\Commands\ListSchedule;
@@ -54,7 +53,7 @@ public function register()
5453
}
5554

5655
if (! defined('TOTEM_DATABASE_CONNECTION')) {
57-
define('TOTEM_DATABASE_CONNECTION', config('totem.database_connection', Schema::getConnection()->getName()));
56+
define('TOTEM_DATABASE_CONNECTION', config('totem.database_connection', config('database.default')));
5857
}
5958

6059
$this->commands([

0 commit comments

Comments
 (0)