Answer the question
In order to leave comments, you need to log in
How to properly organize bundles in Symfony2?
I haven’t quite figured out the concept of bundles yet, so I’m asking for help.
The site has 3 main sections - public, personal account and admin panel. Should these sections be separate bundles or controllers? If these should be different bundles, then what about entities that are used in several bundles?
UPD: I will add that the load on the project is quite high and, perhaps, in the future each section will be moved to a separate machine with one common database.
Answer the question
In order to leave comments, you need to log in
In this case, you will not receive any benefit from splitting projects into bundles. Therefore, it will be more convenient to put all three sections in one bundle, but to separate the controllers and templates into different directories.
something like:
CompanyName\YourBundle\Controller\Admin\UsersController;
CompanyName\YourBundle\Controller\Admin\NewsController;
CompanyName\YourBundle\Controller\Public\UsersController;
CompanyName\YourBundle\Controller\Public\NewsController;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question