Magento : How to Create Controller in Magento

In This article we will discuss how to create controller in magento module controller. Controller is used to communicate between Model and View, For example we want to create a new group of controller class under a mymodule controller folder.
My Module folder structure is:


We will create new folder ‘render’ under mymodule controller folder and now create new controller class under newly created folder.


Then url would be new controller action :


You can also check other tutorial of magento,

Step 1: First we will create a controller(renderContrioller.php) file under controllers folder.

Step 2: Write below code in above created file.

Step 3: We will create folder 'render' same name as above controller file created.


Step 4: We will create Carousel controller under render folder.