I am trying to connect to multiple databases in cakephp 3. I have tried many times but all questions and answers are in cakephp 2
cakephp 3
cakephp 2
You can declare the defaultConnectionName() method on the tables that will use by default another connection. In any of your Table classes:
defaultConnectionName()
public static function defaultConnectionName() { return 'another_config_name'; }