I want to merge 2 application of cakephp 4 and both app has same name controller, models and templates

i want to merge 2 application of cakephp 4 and both app has same name controller, models and templates , how can i do it ,

i am unable to find any way to do it . if any one can solve this problem then help me .

Controllers are just named the same as the model by convention, but you can create custom Controllers as well. The controller name also decides which templates is loaded so this would at least solve the controller and templates problem.

e.g.

class ToolsController extends Controller
{
    public function myAction()
    {
        $users = $this->fetchTable('Users');
        // $users is the same as $this->Users in e.g. a UsersController
    }
}

This would load the template from templates/Tools/my_action.php


The main problem I see here is the fact, that both app’s use the same Model names, so does this mean you have the same database names as well?