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

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.

主站蜘蛛池模板: 四平市| 张掖市| 晋宁县| 剑阁县| 珲春市| 铁岭县| 肇庆市| 合水县| 杭锦旗| 沾化县| 蓬安县| 乌鲁木齐市| 包头市| 高密市| 湘乡市| 永安市| 内黄县| 辽中县| 手机| 环江| 雷山县| 江门市| 东台市| 乌兰浩特市| 卓资县| 山阳县| 洪江市| 汾阳市| 化州市| 盖州市| 白玉县| 津市市| 崇阳县| 成安县| 丹江口市| 灵丘县| 林州市| 仪陇县| 泰来县| 大方县| 永泰县|