Model-View-Controller (MVC)
CodeIgniter structure depends on MVC design. MVC is a product that gives you a different legitimate view from the introduction see. Because of this, a site page contains insignificant scripting.
Model
Models are overseen by the Controller. It speaks to your information structure. Model classes contain works through which you can embed, recover or update data in your database.
Some points to be noted
Naturally, list technique is constantly stacked in the event that you have not composed any second strategy in the URL. For instance, if your strategy is
public function index()
At that point your URL will resemble
abc.com/index.php/file/index/
Or then again
abc.com/index.php/file/
In any case, if your technique is
public function xyz()
At that point your URL will resemble
abc.com/index.php/file/xyz/
View
View is the data that is introduced before clients. It very well may be a site page or parts of page like header and footer.
Controller
Controller is the mediator among models and view to process HTTP demand and creates a site page. All the solicitations got by the controller are given to models and view to process the data. It is the focal point of all your solicitations on your web application.
Some points to be noted
- The Controller document must be named beginning with the capitalized letter.
- Class name ought to likewise begin with the capitalized letter and ought to be equivalent to your record name.
- The given calss reaches out to the CI_Controller with the goal that it acquires every one of its techniques.
In the event that you imagine that Models are of no utilization to you or they are increasingly mind boggling then you can overlook them and manufacture your task utilizing Controllers and perspectives.