尊龙凯时人生就是博

laravelÏîÄ¿ÔõôÔËÐÐ

laravelÏîÄ¿ÊÇÒ»¸öºÜÊÇÊ¢ÐеÄphp¿ò¼Ü £¬Ëü¼ò»¯ÁË¿ª·¢Ê¹Ãü²¢ÌṩÁËÐí¶àÓÐÓõĹ¦Ð§ºÍ¹¤¾ß¡£ÈôÊÇÄúÕýÔÚʹÓÃlaravel¾ÙÐпª·¢ £¬ÄÇôÄúÐèÒªÖªµÀÔõÑùÔËÐÐÄúµÄÏîÄ¿ £¬ÒÔ±ã¾ÙÐвâÊԺͰ²ÅÅ¡£

ÒÔÏÂÊÇLaravelÏîÄ¿ÔËÐеİ취£º

1.×°ÖÃLaravel

ÈôÊÇÄú»¹Ã»ÓÐ×°ÖÃLaravel £¬ÄÇôÄúÐèÒªÏÈ×°ÖÃËü¡£Äú¿ÉÒÔ´Ó¹Ù·½ÍøÕ¾https://laravel.com/docs/8.x/installationÏÂÔØ×îа汾µÄLaravel¡£Äú¿ÉÒÔ×°ÖÃËüͨ¹ýComposer»òÕßÖ±½ÓÏÂÔØÔ´Âë×°Öà £¬ÕâÀïÎÒÃÇÒÔComposerΪÀý×Ó¡£

Ê×ÏÈ £¬ÄúÐèҪװÖÃComposer¡£·­¿ªÖÕ¶Ë £¬ÊäÈëÒÔÏÂÏÂÁ

sudo apt install composer

µÇ¼ºó¸´ÖÆ

È»ºó £¬Äú¿ÉÒÔʹÓÃÒÔÏÂÏÂÁîÔÚÄúµÄÅÌËã»úÉÏ×°ÖÃLaravel£º

composer create-project --prefer-dist laravel/laravel myproject

µÇ¼ºó¸´ÖÆ

Õ⽫ÔÚÄúµÄÅÌËã»úÉϽ¨ÉèÒ»¸öÃûΪ¡°myproject¡±µÄÎļþ¼Ð £¬ÆäÖаüÀ¨LaravelÏîÄ¿µÄËùÓÐÎļþºÍÒÀÀµÏî¡£ÈôÊÇÄú²»ÏëÖØÐÂ×îÏȽ¨ÉèÒ»¸öÏîÄ¿ £¬ÄúÒ²¿ÉÒÔ´ÓGitHubÉϵÄLaravel¹Ù·½Ê¾Àý¿ÍÕ»Öи´ÖƲ¢Õ³ÌùʾÀý´úÂë¡£

2.ÉèÖÃÊý¾Ý¿â

ÔÚÄú¿ÉÒÔÔËÐÐLaravelÏîĿ֮ǰ £¬ÄúÐèÒªÉèÖÃÊý¾Ý¿â¡£ÔÚÏîÄ¿Îļþ¼ÐÖÐ £¬Äú¿ÉÒÔÕÒµ½.envÎļþ £¬ÄúÐèÒªÔÚÆäÖÐÉèÖÃÊý¾Ý¿âÅþÁ¬ÐÅÏ¢¡£ÄúÐèÒªÉèÖÃÒÔÏÂÄÚÈÝ£º

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=mydatabase
DB_USERNAME=myusername
DB_PASSWORD=mypassword

µÇ¼ºó¸´ÖÆ

È·±£½«ÉÏÃæµÄÄÚÈÝÌ滻ΪÄú×Ô¼ºµÄÊý¾Ý¿âÅþÁ¬ÐÅÏ¢¡£

3.ÌìÉúÓ¦ÓóÌÐòÃÜÔ¿

ÔÚ.envÎļþÖÐ £¬ÄúÐèҪΪÄúµÄÓ¦ÓóÌÐòÌìÉúÒ»¸öÃÜÔ¿¡£ÃÜÔ¿½«ÓÃÓÚ¼ÓÃÜÊý¾Ý £¬Òò´ËÄúÐèҪȷ±£ËüÊÇΨһÇÒÇå¾²µÄ¡£·­¿ªÖÕ¶Ë £¬½øÈëÄúµÄÏîÄ¿Îļþ¼Ð²¢ÔËÐÐÒÔÏÂÏÂÁ

php artisan key:generate

µÇ¼ºó¸´ÖÆ

4.ÔËÐÐǨáã

½ÓÏÂÀ´ £¬ÄúÐèÒªÔËÐÐǨáãÒÔ½¨ÉèÊý¾Ý¿âÖеıíºÍÁС£ÔÚÖÕ¶ËÖÐ £¬ÊäÈëÒÔÏÂÏÂÁ

php artisan migrate

µÇ¼ºó¸´ÖÆ

Õ⽫ÔËÐÐÊý¾Ý¿âǨáã £¬²¢½«½¨ÉèÄúÔÚLaravelÏîÄ¿Öнç˵µÄËùÓбí¡£

5.ÔËÐÐÏîÄ¿

µ±LaravelÏîÄ¿ÉèÖÃÍê±ÏÇÒǨáãÍê³ÉÖ®ºó £¬Äú¿ÉÒÔʹÓÃÒÔÏÂÏÂÁîÔÚÍâµØÅÌËã»úÉÏÔËÐÐËü£º

php artisan serve

µÇ¼ºó¸´ÖÆ

Õ⽫Æô¶¯LaravelµÄÍâµØ¿ª·¢Ð§ÀÍÆ÷ £¬²¢×îÏÈÔËÐÐÄúµÄÓ¦ÓóÌÐò¡£ÔÚä¯ÀÀÆ÷ÖÐÊäÈë¡°http://localhost:8000¡±¼´¿É»á¼û¸ÃÏîÄ¿¡£

ͨ¹ýÉÏÊö°ì·¨ £¬Äú¿ÉÒÔÇáËɵؽ«ÄúµÄLaravelÏîÄ¿°²ÅÅÔÚÍâµØÅÌËã»úÉϾÙÐвâÊԺͿª·¢¡£¼ÇµÃÔÚÏîÄ¿ÖÐʹÓÃͨÀýµÄÇå¾²ÒªÁìÀ´±£»¤ÄúµÄ´úÂëºÍÊý¾Ý¡£

ÒÔÉϾÍÊÇlaravelÏîÄ¿ÔõôÔËÐеÄÏêϸÄÚÈÝ £¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

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

Ïà¹ØÐÂÎÅ

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

13452372176

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

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

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