尊龙凯时人生就是博

laravelµÄ·ÓÉÔõÑùÉó²é

laravelÊÇÒ»¿îÊ¢ÐеÄphp¿ò¼Ü£¬ËüÊÇÒ»¸öÇáÁ¿¼¶µÄmvc¿ò¼Ü£¬°üÀ¨ÁËÐí¶àÊÊÓõĹ¦Ð§ºÍ×é¼þ£¬ºÃ±È·ÓÉϵͳ¡£laravelµÄ·ÓÉϵͳÊǺÜÊÇÇ¿Ê¢ºÍÎÞаµÄ£¬¿ÉÒÔÉÁ¿ª·¢Ö°Ô±Àû±ãµØ½ç˵ºÍÖÎÀíÓ¦ÓóÌÐòµÄ·ÓÉ¡£

ÔÚLaravelÓ¦ÓóÌÐòÖУ¬Äú¿ÉÒÔʹÓá°artisan route:list¡±ÏÂÁîÀ´Éó²éËùÓÐÒѽç˵µÄ·ÓÉ¡£ÏÂÃæÊÇÔõÑùʹÓÃÕâ¸öÏÂÁîÀ´Éó²éLaravelµÄ·ÓÉ¡£

°ì·¨1£º·­¿ªÖն˻òÏÂÁîÐÐ

ÔÚÄúµÄ²Ù×÷ϵͳÖз­¿ªÒ»¸öÖն˻òÏÂÁîÐнçÃæ¡£¹ØÓÚWindowsÓû§£¬Äú¿ÉÒÔͨ¹ýÔÚËÑË÷À¸ÖмüÈë¡°cmd¡±À´·­¿ªÏÂÁîÌáÐÑ·û¡£¹ØÓÚMacºÍLinuxÓû§£¬Äú¿ÉÒÔͨ¹ý°´Ï¡°Control + Alt + T¡±×éºÏ¼üÀ´·­¿ªÖնˡ£

°ì·¨2£º½øÈëLaravelÓ¦ÓóÌÐòµÄ¸ùĿ¼

ʹÓá°CD¡±ÏÂÁî½øÈëÄúµÄLaravelÓ¦ÓóÌÐòµÄ¸ùĿ¼¡£ÀýÈ磬ÈôÊÇÄúµÄLaravelÓ¦ÓóÌÐòλÓÚ¡°/var/www/html/myapp¡±Ä¿Â¼ÖУ¬Ôò¿ÉÒÔʹÓÃÒÔÏÂÏÂÁî½øÈë¸ÃĿ¼£º

cd /var/www/html/myapp

µÇ¼ºó¸´ÖÆ

°ì·¨3£ºÔËÐС°artisan route:list¡±ÏÂÁî

ÔÚÄúµÄLaravelÓ¦ÓóÌÐòµÄ¸ùĿ¼Ï£¬ÔËÐÐÒÔÏÂÏÂÁ

php artisan route:list

µÇ¼ºó¸´ÖÆ

µ±Äú°´Ï»سµÊ±£¬Äú½«¿´µ½ÀàËÆÓÚÒÔÏÂÄÚÈݵÄÊä³ö£º

+--------+----------+------------------------+------+--------------------------------------------------------+------------+
| Domain | Method   | URI                    | Name | Action                                                 | Middleware |
+--------+----------+------------------------+------+--------------------------------------------------------+------------+
|        | GET|HEAD | /                      |      | Closure                                                | web        |
|        | GET|HEAD | api/user               |      | Closure                                                | api        |
|        | GET|HEAD | hello                  |      | AppHttpControllersHelloController@index             | web        |
|        | GET|HEAD | user/{id}              |      | AppHttpControllersUserController@show              | web        |
|        | POST     | user                   |      | AppHttpControllersUserController@store             | web        |
+--------+----------+------------------------+------+--------------------------------------------------------+------------+

µÇ¼ºó¸´ÖÆ

Õâ¸ö±í¸ñÏÔʾÁËÒѽç˵µÄÿ¸ö·ÓɵÄÏà¹ØÐÅÏ¢£¬°üÀ¨ÓòÃû£¬HTTPÒªÁ죬URI£¬Â·ÓÉÃû³Æ£¬ÒªÁ죬ÒÔ¼°Ó¦ÓÃÓÚ·ÓɵÄÖÐÐļþ¡£

ÈôÊÇÄúµÄLaravelÓ¦ÓóÌÐòÖÐÓÐÐí¶à·ÓÉ£¬Äú¿ÉÒÔÌí¼Ó¡°–sort=name¡±Ñ¡ÏîÒÔ°´Ãû³ÆÅÅÐòËüÃÇ£¬ÈçÏÂËùʾ£º

php artisan route:list --sort=name

µÇ¼ºó¸´ÖÆ

Õ⽫ƾ֤·ÓÉÃû³Æ¶ÔËùÓзÓɾÙÐÐÅÅÐò¡£

»¹¿ÉÒÔʹÓá°–path=uri¡±Ñ¡ÏîÀ´½öÏÔʾÓëÖ¸¶¨URIÏà¹ØµÄ·ÓÉ£¬ÈçÏÂËùʾ£º

php artisan route:list --path=user

µÇ¼ºó¸´ÖÆ

Õ⽫ֻÏÔʾURIÖаüÀ¨¡°user¡±µÄ·ÓÉ¡£

×ܽá

ʹÓá°artisan route:list¡±ÏÂÁî¿ÉÒÔÇáËÉÉó²éÄúµÄLaravelÓ¦ÓóÌÐòÖÐÒѽç˵µÄËùÓзÓÉ¡£´ËÏÂÁîÒ²ÔÊÐíÄúʹÓòî±ðµÄÑ¡ÏîºÍ¹ýÂËÆ÷À´²éÕÒºÍÅÅÐò·ÓÉ¡£Õâ¸öССµÄ¼¼ÇÉ¿ÉÒÔ×ÊÖúÄú¸üºÃµØ×éÖ¯ºÍÖÎÀíÄúµÄLaravelÓ¦ÓóÌÐò¡£

ÒÔÉϾÍÊÇlaravelµÄ·ÓÉÔõÑùÉó²éµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

ÃâÔð˵Ã÷£ºÒÔÉÏչʾÄÚÈÝȪԴÓÚÏàÖúýÌå¡¢ÆóÒµ»ú¹¹¡¢ÍøÓÑÌṩ»òÍøÂçÍøÂçÕûÀí£¬°æȨÕùÒéÓë±¾Õ¾Î޹أ¬ÎÄÕÂÉæ¼°¿´·¨Óë¿´·¨²»´ú±í尊龙凯时人生就是博ÂËÓÍ»úÍø¹Ù·½Ì¬¶È£¬Çë¶ÁÕß½ö×ö²Î¿¼¡£±¾ÎĽӴýתÔØ£¬×ªÔØÇë˵Ã÷À´ÓÉ¡£ÈôÄúÒÔΪ±¾ÎÄÇÖÕ¼ÁËÄúµÄ°æȨÐÅÏ¢£¬»òÄú·¢Ã÷¸ÃÄÚÈÝÓÐÈκÎÉæ¼°ÓÐÎ¥¹«µÂ¡¢Ã°·¸Ö´·¨µÈÎ¥·¨ÐÅÏ¢£¬ÇëÄúÁ¬Ã¦ÁªÏµ尊龙凯时人生就是博ʵʱÐÞÕý»òɾ³ý¡£

Ïà¹ØÐÂÎÅ

ÁªÏµ尊龙凯时人生就是博

18523999891

¿É΢ÐÅÔÚÏß×Éѯ

ÊÂÇéʱ¼ä£ºÖÜÒ»ÖÁÖÜÎ壬9:30-18:30£¬½ÚãåÈÕÐÝÏ¢

QR code
sitemap¡¢ÍøÕ¾µØͼ