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

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.

主站蜘蛛池模板: 乌鲁木齐县| 炉霍县| 祁门县| 汶上县| 房山区| 正镶白旗| 鄢陵县| 观塘区| 开阳县| 尼玛县| 武山县| 黄大仙区| 湖南省| 河南省| 安乡县| 广南县| 阿合奇县| 安多县| 贡嘎县| 桐梓县| 岑溪市| 长武县| 陆丰市| 南充市| 唐河县| 梁山县| 根河市| 阳曲县| 霍山县| 桑日县| 永川市| 金堂县| 清流县| 肥乡县| 崇信县| 临江市| 会泽县| 金溪县| 浠水县| 庆城县| 丰原市|