å¦ä½åå° laravel é ç½®å¯ä»¥ç½ç«åå°é ç½®ã社群系ç»thinksns+ç åæ¥è®°åã_php_web-itnose
é¦é¡µ
asp
php
javascript
iis
apache
html/css
coldfusion
ajax
vbscript
cgi
xml/xsl
è·¨æµè§å¨å¼å
ruby/rails
ç¨åºå
html5
jquery
seo
jboss
json
angularjs
markdown
nginx
thinkphp
yii
pageadmin
extjs
wampserver
kendo ui
coffeescript
gulp
ecmascript
bootstrap
itnoseé¦é¡µ > web > php >
å¦ä½åå° laravel é ç½®å¯ä»¥ç½ç«åå°é ç½®ã社群系ç»thinksns+ç åæ¥è®°åã
2017-06-06 15:50
æ¬æå享ä¸å©ç¨ laravel ç bootstrapping è¾¾å°ç½ç«åå°è®¾ç½® laravel é ç½®ã
éæ±åºæ¯
é¦å ï¼thinksns+ ä½ä¸ºä¸ä¸ªç¨æ·å¯ä»¥ä½¿ç¨çã社交系ç»ãåå¼æºç½ç«ç¨åºä¸æ ·æ¥æåå°ï¼æä¸äºé ç½®ï¼laravel æ¯è¦æ±åå¨ /config/*.php çé ç½®æ件ä¸çï¼ä¾å¦ app.nameãapp.debug çä¿¡æ¯çé ç½®ï¼ä»¥å jobs ç驱å¨é ç½®ï¼å¹¿æç³»ç»çé ç½®çï¼æ们é½æ¬å°äºç½ç«åå°ï¼ç¨æ·å®è£ åå¯ä»¥ä¸ç¨ä¿®æ¹é ç½®æ件çæ åµä¸éåé ç½®ã
å¦ä½è¦çé ç½®
æ们é¦å æå¼ illuminatefoundationapplication::bootstrapwith æ¹æ³ï¼ä»£ç å¦ä¸ï¼
éç¹ä»£ç å¨ $this[‘events’]->fire(‘bootstrapping: ‘.$bootstrapper, [$this]); å $this[‘events’]->fire(‘bootstrapped: ‘.$bootstrapper, [$this]); ä¸ï¼å¾ææ¾æ¯å 载并è¿è¡ bootstrapper çåç½®ååç½®äºä»¶ã
æ以ï¼æ们çè¿æä¸ä¸ªæ¹æ³å«å beforebootstrapping å afterbootstrapping ç¶åæä¹åå¢ï¼æ们ç
没éï¼è¿éæ¯åºå®äºé¡ºåºçï¼æé误çå 载顺åºï¼ä¼é ælaravelç失败ï¼æ以ï¼æ们éæ©å¨ä¹åç»§æ¿ illuminatefoundationapplication çåºç¨åºç¡ä¸å¢å ä¸ä¸ªäºä»¶ï¼ä»£ç å¦ä¸ï¼
åªéæ·»å çäºä»¶
å 为 thinksns+ æ¯ç»§æ¿äº illuminatefoundationapplication å®ç°äºæ°ç application ç±»ï¼æ以æ们ç´æ¥å¨æé æ¹æ³éé¢å¢å äºä»£ç ãè¿æ ·ï¼å½ laravel å¯å¨ï¼ä½æ¯è¿æ²¡æå è½½ bootstrapper çæ¶åï¼å·²ç»æ å è½½é ç½®çåç½®äºä»¶æ³¨å ¥è¿å»äºãå½å è½½é ç½®æ§è¡å®æåå°±ä¼æ§è¡ææ³¨å ¥çåç½®äºä»¶ã
åç½®äºä»¶çå®ç°
æ们å¨åå»ºäº zhiyiplusbootstraploadconfiguration è¿æ ·ä¸ä¸ªç±»ï¼æ³¨å为åç½®äºä»¶ï¼è·¯å¾ä¸ºï¼ /app/bootstrap/loadconfiguration.php ï¼ç¶åå®ç°ä»£ç å¦ä¸ï¼
å¾ç®åï¼å 为 app(‘config’) æ¯ä¸ä¸ª illuminatecontractsconfigrepository æ¥å£çå®ä¾ï¼æ以ç´æ¥è°ç¨ set æ¹æ³è¿è¡é ç½®è¦çãè zhiyiplussupportconfiguration ç±»æ¯å°è£ çèªå®ä¹é ç½®å 载类ï¼å è½½çé ç½®æ件åæ¾å¨ä¸ä¸ª yaml æ件ä¸ï¼è¿ä¸ªç±»å®ç°äº èªå®ä¹é ç½®æ件çå è½½åä¿åãè¿æ ·ï¼æ们ä»åå°è°ç¨ api ç¶å constroller è°ç¨è¿ä¸ªç±»ç save æ¹æ³è¿è¡æä¹ åã
zhiyiplussupportconfiguration::getconfigurationbase
为ä»ä¹è¦ç¹æ®è¯´ä¸ä¸è¿ä¸ªæ¹æ³ï¼å 为è¿ä¸ªæ¹æ³çç¹æ®æ§ï¼ä¹æ¯ depth merge å®ç°çéè¦å½æ°ï¼å¨ repository ä¸æ¯æ app.name = value è¿æ ·çå½¢å¼è¿è¡æ·±æ¾é®å¼èµå¼ï¼å©ç¨è¿ä¸ä¸ªç¹æ§ï¼è¿ä¸ªå½æ°å° å¤ç»´æ°ç»è½¬æ¢ä¸ºä¸ç»´ãææï¼
ç¶åè°ç¨ app(‘config’)->set($arr) 就对 laravel ç config è¿è¡äº depth mergeãæåï¼æä¹ åä¿åç yaml å 容å¦ä¸ï¼
æ以ï¼åºäº depth merge å¨ .plus.yml é ç½®ä¸ï¼åªéè¦ä¿åé¨åé ç½®ï¼å³å¯ä¸æ³é ç½®ç»æçå®æ´æ§çæ åµä¸å¯¹ laravel éåé ç½®å并ã
å¼æºä»£ç ä»åº
githubï¼https://github.com/zhiyicx/th…ï¼ç¹å»starï¼æ¯æ¥å ³æ³¨å¼åå¨æãï¼
thinksnså®ç½ï¼http://www.thinksns.com/
å æµç³è¯·æ¹å¼
ããæä¾ä¸ªäºº/ä¼ä¸èç³»æ¹å¼å认è¯ä¿¡æ¯ï¼å®åid /ä¼ä¸è¥ä¸æ§ç §ç §çææ«æ件ï¼åç³è¯·è¯´æï¼åéé®ä»¶è³lihecong@zhishisoft.comå°ææºä¼è·å¾é¦æ¹å æµèµæ ¼ï¼åé¢æéï¼ç³è¯·ä»éã
ããåä¸å æµè¯·æä¾ä»¥ä¸èµæ
ãã1个å¯æ¥æ¶éªè¯ç çææºå·ï¼1个æå®é®ç®±ï¼1ä½æµè¯äººåå§åï¼1个æ¨å欢çè´¦å·æµç§°
ããå¼æºä¸æï¼ä¸ºäºäºåå¼æºï¼æ们å¢éåäºå¾å¤åªåãæåºäºlaravelçä½åå±ç¤ºå¨å¤§å®¶é¢åï¼ä¹åä¸æ ä¼æç»ä¸æçå享thinksns +å¼åè¿ç¨ä¸çææ¯ç»èã
ç¸å
³æç´¢ï¼
å¦ä½åå¾è¡¨
jspåå°ç®¡çç³»ç»
jspé
ç½®
.neté
ç½®
hibernate é
ç½®
ç¸å ³æç«
2017-06-05 21:07 åºäº laravel route ç 社交系ç»thinksns+ componentãç åæ¥è®°ç³»åä¸ã
2017-06-08 16:22 åºäº laravel ç thinksns+ alpha.2 çæ¬åå¸ãç åæ¥è®°å
ã
2017-06-14 17:34 è°è° laravel 5.5 ç ãèªå¨åç°ãåæ¤å»å¿æ
ã社交系ç»ç åæ¥è®°ä¸ã
2016-03-27 22:40 laravelåå°å¯ä¿®æ¹é
ç½®èªå¨å è½½
2017-02-09 10:24 [ laravel 5.4 ææ¡£ ] èµ·æ¥ — é
ç½®
æ´å¤ç¸å ³æç« >>
ææ°æç«
2017-06-20 01:35 èé们ï¼æ没æå¯è½è®©phpæ件åæ¶åªè½ä¸ä¸ªäººè®¿é®
2017-06-20 01:35 æä¹ç¦æ¢å¾çç´æ¥éè¿url访é®
2017-06-20 01:35 æ±æ!å¯å¨wampåªè½ç¨æ¬æºè®¿é®,åå±åç½çå
¶å®è®¾å¤è®¿é®ä¸å°!æäºå¤§å天t-t
2017-06-19 15:35 nginxä¸çthinkphpé®é¢
2017-06-19 15:35 php form æ件ä¸ä¼
æ´å¤ææ°æç« >>
çé¨æç´¢
é
ç½®hibernate
springé
ç½®
spring é
ç½®
webserviceé
ç½®
é
ç½®webservice
å¦ä½åexcelå¾è¡¨
jspç¯å¢é
ç½®
.netç¯å¢é
ç½®
hibernate é
ç½®æ件
spring mvc é
ç½®
spring äºå¡é
ç½®
springé
ç½®æ件
spring é
ç½®æ件
spring mvcé
ç½®
spring aopé
ç½®
京icpå¤14022385å·-2
©2014 itnose软件ç¼ç¨æç¨ | èç³»æ们ï¼emailï¼twobrushes@126.com qq:35155868