Controllers

Learn what controllers are and how they are created.

Controllers are files that handle application logic and are associated with models, views, helpers, etc. Controllers are created to respond to HTTP requests and are not meant to be included in other files. We should try to refactor controllers into separate files to avoid messy controller code.

Creating a controller

Get hands-on with 1400+ tech skills courses.