My product has 70 customers. Each customer has a MYSQL database and I am using Codeigniter.
I have 70 subfolders e.g domain.com/customer1/ domain.com/customer2/ and so on and in each of these folders, I have mentioned the database details of the specific customer, along with all the files for codeigniter installation.
I want to get rid of all these installations and want to have only one installation for all my customers. Ideally domain.com/app/
What is the best way to achieve this?
I tried dynamically writing into the database.php file when one of the client logs in. So what I did is write the database details of the client in the database.php file of the one code base e.g domain.com/app/ and see if it worked. But it won't work for other clients, I think I am doing something wrong here.