Today is my second day with Symfony2 and I’m still reading docs.
What’s the best way to structure my controllers? Do I need to create a new controller called UserController.php for users, FeedController.php for feed and CommentController.php for comments or is it okay to put everything in DefaultController.php?
Typically all the CRUD actions of an entity are grouped together. So the actions to create, retrieve, update and delete a user would be grouped into a UsersController. The actions to create, retrieve, update and delete a comment would be grouped into a CommentsController. And so forth.
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.