Skip to content

Commit

Permalink
Seta conexão padrão no boot da aplicação
Browse files Browse the repository at this point in the history
  • Loading branch information
edineivaldameri authored Mar 25, 2024
1 parent 8791f78 commit aa1ef9d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/Providers/AppServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace App\Providers;

use App\Http\Middleware\ConnectTenantDatabase;
use App\Models\LegacyInstitution;
use App\Providers\Postgres\DatabaseServiceProvider;
use App\Services\CacheManager;
Expand Down Expand Up @@ -60,6 +61,8 @@ private function loadLegacyBootstrap()
*/
public function boot()
{
ConnectTenantDatabase::setTenantResolver(fn () => config('database.default'));

if ($this->app->runningInConsole()) {
$this->loadLegacyMigrations();
}
Expand Down

0 comments on commit aa1ef9d

Please sign in to comment.