leafsphp / db

🗄 Leaf PHP db module
https://leafphp.dev/modules/db/
6 stars 8 forks source link

[ENHANCEMENT] Multiple database connections using db() #14

Open terrybr opened 2 months ago

terrybr commented 2 months ago

Hello,

I've been testing a way to easily instantiate multiple database connections using db(). Basically, it works like this:

db('instance_name')->connect( 'host', 'dbname, 'user', 'password', 'dbtype', [] );

I can create a PR for this if needed.