public function resolveConnection(Model $entity, string $database)
    {
        return $this->app->make('db')->connection($this->asConnection($entity, $database));
    }
public function resolveConnection(Model $entity, string $database)
    {
        return $this->app->make('db')->connection($this->asConnection($entity, $database));
    }
public function resolveConnection ( Model $ entity , string $ database ) { return $ this -> app -> make ( 'db' ) -> connection ( $ this -> asConnection ( $ entity , $ database ) ) ; }
Resolve tenant database connection.

@param  \Illuminate\Database\Eloquent\Model  $entity
@param  string  $database

@return \Illuminate\Database\Connection
Resolve tenant database connection .