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

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.

主站蜘蛛池模板: 奎屯市| 广饶县| 保康县| 山丹县| 恩平市| 沙雅县| 邮箱| 祁门县| 林口县| 高尔夫| 靖西县| 集贤县| 威信县| 即墨市| 乌恰县| 宿州市| 紫阳县| 建湖县| 江陵县| 吉木萨尔县| 五指山市| 张家口市| 阿克苏市| 开阳县| 沙河市| 常熟市| 丰城市| 南雄市| 江山市| 栖霞市| 建德市| 扎赉特旗| 海阳市| 赣州市| 赤壁市| 衡阳市| 富顺县| 东宁县| 新乐市| 曲水县| 徐闻县|