Application B uses MVC of application A

Hello, folks!

I have two applications (A and B).

B is a copy of A. The operation is the same (models, views and controllers), but application B uses a different database.

In CakePHP 2, I configured this through the file /app/Config/bootstrap.php, through App::build(array());

How do I do this now in CakePHP 5?

How do I say that application B uses application A’s MVC?

Thank you in advance for your assistance.

Please forgive my poor English.

extract the common parts from Application A and B into a cakephp plugin and require it inside both apps.

Hi, Kevin!

Is this the only way to do this? Isn’t there another more automated way?

I want code construction remains focused on application A only.

Applications B, C, D and N will use the same codes as A, but with their own databases.

Thanks a lot.

Seems to me like you have a flawed application setup…

Not like the already existing plugin system is powerful enough to decouple and reuse all parts of the framework…

Either way if you feel there is a “better way” then go ahead and hack away.

No. In fact, I just wanted to confirm that there wasn’t a simpler way, similar to CakePHP 2, which I mentioned in the initial question.

If there’s one thing I’ve learned using CakePHP, it’s that you shouldn’t hack anything.

In any case, I thank you for your attention to my request.