Home  >  Article  >  PHP Framework  >  Quickly let novices understand the concept of ThinkPHP5 model

Quickly let novices understand the concept of ThinkPHP5 model

藏色散人
藏色散人forward
2021-10-26 15:57:292057browse

The following thinkphp framework tutorial column will give you a brief analysis of the concept of ThinkPHP5 model. I hope it will be helpful to friends in need!

Quickly let novices understand the concept of ThinkPHP5 model

Quick and simple understanding:

MVC (Model View Controller) Model-View-Controller

View It is the interface that users see and interact with. Views are generally pages composed of HTML elements. View folder in ThinkPHP.

The model is a container for operating database data and executing business rules. The data format returned by the model is fixed. It provides data for multiple views and is reused by multiple views, reducing code duplication. Model folder in ThinkPHP.

The controller accepts user input and then calls the model and renders the view to complete the user's needs. Generally speaking, the controller only receives the request and decides which model method to call to process the request and then selects which view to render the data. Controller folder in ThinkPHP.

The above are some of my understandings, please feel free to comment.

Recommended: "The latest 10 thinkphp video tutorials"

The above is the detailed content of Quickly let novices understand the concept of ThinkPHP5 model. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:segmentfault.com. If there is any infringement, please contact admin@php.cn delete