public function asDefaultConnection(Model $entity, ?string $database): ?string
    {
        $connection = $this->asConnection($entity, $database);

        $this->app->make('config')->set('database.default', $connection);

        return $connection;
    }