public function connectionTo($key, $database)
    {
        Config::set("database.connections.{$key}.database", $database);

        $this->reconnect($key, $database);
    }
public function connectionTo($key, $database)
    {
        Config::set("database.connections.{$key}.database", $database);

        $this->reconnect($key, $database);
    }
public function connectionTo ( $ key , $ database ) { Config :: set ( "database.connections.{$key}.database" , $ database ) ; $ this -> reconnect ( $ key , $ database ) ; }
Method that changes specific, custom connection database with another.
@param string $key The unified key under which you sill switch dynamically databases, ex. platform, site, etc.
@param string $database The database to switch to.
Method that changes specific custom connection database with another .