In MVC structure, controllers role is to process the requests from the user and generate the responses. The incoming requests are analyzed by the controllers, passed onto models, models results are directed into views and finally a response is generated.

# Controllers Action

Controller contains actions which are called by user to execute a request. A controller can have more than one request.

Following code is an example with two actions update and create in a controller file SiteController.php.