I currently use one controller per action. One of the problemssort ofI encountered is when naming the methods of these controllers, which only have one.Should I use a generic method name like get() or should I encapsulate all my controllers into one and name its methods after the action they do, e.g. indexAction(), userListAction()?
Naming controllers and their methods
php;mvc;naming
I like the Ruby on Rails RESTful routes convention: each controller represents a resource (a noun), and there are 7 conventional actions:Note that resources don't have to map directly to models/database tables - for e.g. password reset, you may create a password_reset resource to request a new password, and update it to set the new password, even though behind the scenes, it only modifies your user model.