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.



6.6k

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