官术网_书友最值得收藏!

The MVC flow

In a very basic MVC workflow, when a user interacts with our application, the steps in the following screenshot are performed. Imagine a simple web application about books, with a search input field. When the user types a book name and presses Enter, the following flow cycle will occur:

MVC flow

The MVC is represented by the following folders and files:

   
MVC Architecture            Application Path                        File
Model            app/                        User.php
View            resources/views                        welcome.blade.php
Controller            app/Http/Controllers                        Auth/AuthController.php
Auth/PasswordController.php

 

Note that the application models are at the root of the app folder, and the application already has at least one file for MVC implementation.

Also note that the app folder contains all of the core files for our application. The other folders have very intuitive names, such as the following:

 

Now, let's see how things work in the Laravel structure.

主站蜘蛛池模板: 海阳市| 清徐县| 从化市| 九江县| 酒泉市| 武鸣县| 莲花县| 宝兴县| 澳门| 邵阳市| 泗阳县| 宜宾县| 娱乐| 丹东市| 抚顺县| 津市市| 繁昌县| 南漳县| 秦皇岛市| 闻喜县| 临猗县| 泰兴市| 河源市| 平乡县| 湘潭市| 广宗县| 恩平市| 淮安市| 涞源县| 临安市| 漯河市| 永吉县| 信宜市| 绵阳市| 涿鹿县| 和平县| 光山县| 那坡县| 湄潭县| 宁国市| 大埔区|