Home > PHP Framework > ThinkPHP > body text

Quickly let novices understand the concept of ThinkPHP5 model

藏色散人
Release: 2021-10-26 15:57:29
forward
2123 people have browsed it

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!

Related labels:
source:segmentfault.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template