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

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.

主站蜘蛛池模板: 黄浦区| 阿克| 天台县| 江永县| 白银市| 曲阳县| 横山县| 和平县| 新乡市| 油尖旺区| 九寨沟县| 嘉祥县| 太湖县| 防城港市| 抚松县| 崇阳县| 克拉玛依市| 蓝田县| 栖霞市| 鹤山市| 永康市| 开阳县| 萨嘎县| 行唐县| 辽阳市| 微山县| 大同市| 庆元县| 西峡县| 溧水县| 舟山市| 河西区| 鞍山市| 林口县| 福清市| 蓝山县| 桐柏县| 滨海县| 宁德市| 富阳市| 文水县|