当前位置:网站首页>Laravel document sorting 10. Request life cycle
Laravel document sorting 10. Request life cycle
2022-06-25 04:19:00 【Angry devil】
Preface :Laravel Document sorting , Only for record , Nothing else .
1、 User access laravel Framework of the project website , Web server , First, direct the request settings to /public/index.php file .
2、Index.php File loading composer Generated autoloader , obtain bootstrap/app.php The application instance generated in the file .
3、 Next , That's it app/Http/Kernel.php file , This document , Expanded
Illuminate\Foundation\Http\Kernel This document , Realization , Handle errors ahead of time , journal , Detect the application environment , And other tasks that should be completed in advance .
4、 Send back http The corresponding , End cycle .
explain :http The core of the also defines a list of middleware , Such as session Reading and writing 、 verification CSRF token 、 Determine if the application is in maintenance mode , And others .
The most important core startup yes : The service provider that loads the application .
This is probably , from config/app.php In the document $provider The primary key in the array , then , Put these components , To register , then ,boot Method , It will be called , Last , Which component does the project use , Direct distribution , That's all right. .
Personal comparative understanding of the life cycle :
take laravel The frame is compared to a special forces , request , It is equivalent to an order , After the order was given , Special forces have to get mission information , This is his conscious reaction , That is, automatically load , After understanding the task , He needs to get the gun 、 ammunition 、 Body armor 、 dagger 、 lighter 、 Food and other necessities , These are like loading components , After receiving it , He must check whether the gun is in good condition and usable , Is there enough ammunition , Whether the food is sufficient , Whether there are enough other things to bring , This one is similar to $provider, Component registration , Wait for everything to be ready , It is equivalent to that this part of the operation between request and response has been completed , That is, the component is registered , Next , Is to perform the task , That is, responding to a request , Assign to the corresponding route , It is equivalent to that special forces should go to the designated place to perform tasks , Kill the enemy , Now , The firearms of the middleware 、 The bullet 、 dagger , These components , Can be used to kill the enemy , amount to boot Method , The final response result , Is to kill the enemy , To complete the task , End cycle .
边栏推荐
猜你喜欢

"Comment positionner l'industrie" dans la planification industrielle locale / parc

Cesium drag 3D model

1、项目第二阶段——用户注册和登陆

Hello CTP (IV) - CTP transaction API

Hello CTP (III) - CTP quotation API

client-go gin的简单整合十一-Delete

Hello CTP (II) -- Introduction to CTP

WMS仓储管理系统的使用价值,你知道多少

Numpy NP tips: use OpenCV to interpolate and zoom the array to a fixed shape cv2 resize(res, dsize=(64, 64), interpolation=cv2. INTER_ CUBIC)
![[team learning] SQL programming language notes - task04](/img/3e/c75f5b4610c6b6700567fe75cd2339.png)
[team learning] SQL programming language notes - task04
随机推荐
讲座记录《多种空间大地测量技术的数据处理方法和应用》
Development of trading system (V) -- Introduction to Sinovel counter
讲座记录《惯性导航的新应用——惯性测量》
95% of programmers fish here
[team learning] SQL programming language notes - task04
Coinlist how to operate the middle lot number security tutorial
【LeetCode】148. Sort linked list
How to use ide to automatically sign and debug Hongmeng application
【LeetCode】143. Rearrange linked list
kenlm
Uniapp makes mobile app programs, using uni Choosevideo record video, video playback is fuzzy, and the resolution is low
Lecture record: history and development of strapdown inertial navigation solution
Zoran community
navicat可不可以直接操作安卓数据库SQLite
BSC parsing input data of transaction
【openwrt】推荐一个国内开发的openwrt的版本,iStoreOS简介,非常好用,主要是做了一些优化。解决了汉化的问题。
DAP data scheduling function improvement description
"Grammar sugar" -- my new programming knowledge
How to quickly deliver high-value software
Trading system development (IV) - trading counter system