We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Virtual Sub Directory

The goal is to pull from different databases based on the route.

So for example: mywebsite.com/cars pulls the database_1 -This is the default database mywebsite.com/version2/cars pulls from database_2 -Another database

"version2" just a sub directory that i want so once a user accesses it, it pulls from another database.

So same source code just different databases.


if its an api change $config->database based on route match

if its a full stack you will neet to change it before the connection to db is made