尊龙凯时人生就是博

git´î½¨laravelÇéÐÎ

ÔÚ¾ÙÐÐlaravel¿ª·¢Ö®Ç° £¬ÎÒÃÇÐèÒªÏȴºÃlaravelµÄ¿ª·¢ÇéÐΡ£¶øÔڴÇéÐεÄÀú³ÌÖÐ £¬Ê¹ÓÃgit¾ÙÐдúÂëÖÎÀíÊÇÒ»¸ö²»´íµÄÑ¡Ôñ¡£git²»µ«¿ÉÒÔ×ÊÖúÎÒÃÇÖÎÀí°æ±¾ £¬»¹¿ÉÒÔΪÎÒÃÇÌṩЭ×÷¿ª·¢µÄ±ãµ±¡£Òò´Ë £¬±¾ÎĽ«ÏÈÈÝÔõÑùʹÓÃgit´î½¨laravelÇéÐΡ£

Ò»¡¢×°ÖÃGit

Ê×ÏÈ £¬ÎÒÃÇÐèҪװÖÃGit¡£GitÊÇÒ»¸öÃâ·ÑµÄ¿ªÔ´°æ±¾¿ØÖÆϵͳ £¬Ö§³Ö¶àÖÖƽ̨¡£ÔÚLinuxϵͳÉÏ £¬¿ÉÒÔͨ¹ýÒÔÏÂÏÂÁî×°ÖÃGit£º

sudo apt-get update

sudo apt-get install git

WindowsºÍMacOSϵͳÏ £¬¿ÉÒÔÇ°ÍùGit¹ÙÍøÏÂÔØ×°ÖóÌÐò¾ÙÐÐ×°Öá£

×°ÖÃÍê³Éºó £¬ÎÒÃÇ¿ÉÒÔͨ¹ýÒÔÏÂÏÂÁî¼ì²éGitÊÇ·ñÀÖ³É×°Öãº

git –version

¶þ¡¢½¨ÉèLaravelÏîÄ¿

½ÓÏÂÀ´ £¬ÎÒÃÇÐèÒª½¨ÉèÒ»¸öLaravelÏîÄ¿ £¬ÕâÀïÎÒÃÇʹÓÃcomposerÏÂÁîÀ´½¨Éè¡£ÔÚÖÕ¶ËÊäÈëÒÔÏÂÏÂÁ

composer create-project –prefer-dist laravel/laravel mynewlaravel

ÕâÀïÎÒÃǽ«ÏîÄ¿ÃûÉèÖÃΪmynewlaravel £¬Äã¿ÉÒÔƾ֤×Ô¼ºµÄÐèÒªÐ޸ġ£

½¨ÉèÍê³Éºó £¬½øÈëÏîÄ¿Îļþ¼Ð²¢³õʼ»¯Git£º

cd mynewlaravel

git init

Èý¡¢Ìí¼ÓLaravelÇéÐÎÎļþ

½ÓÏÂÀ´ £¬ÎÒÃÇÐèÒª½«LaravelÇéÐÎÎļþÌí¼Óµ½Git¿ÍÕ»ÖС£LaravelÇéÐÎÎļþÈÏÕæ´æ´¢ÏîÄ¿µÄÉèÖÃÐÅÏ¢ £¬ºÃ±ÈÊý¾Ý¿âÐÅÏ¢¡¢»º´æÉèÖõȵÈ¡£ÔÚLaravelÖÐ £¬ÇéÐÎÎļþͨ³£ÃüÃûΪ.env £¬ÔÚн¨ÉèµÄLaravelÏîÄ¿ÖÐ £¬Äã¿ÉÒÔÔÚ¸ùĿ¼ÖÐÕÒµ½Ò»¸öÃûΪ.env.exampleµÄÎļþ¡£

ÎÒÃÇÐèÒª½«.env.exampleÎļþ¸´ÖÆÒ»·Ý £¬²¢½«ÆäÃüÃûΪ.env£º

cp .env.example .env

½ÓÏÂÀ´ÔËÐÐÒÔÏÂÏÂÁ

php artisan key:generate

Õâ¸öÏÂÁî»áΪÏîÄ¿ÌìÉúÒ»¸öΨһµÄÃØÔ¿ £¬²¢½«ÆäÌí¼Óµ½.envÎļþÖС£ÓÉÓÚ.envÎļþÖаüÀ¨Ãô¸ÐÐÅÏ¢ £¬ÎÒÃÇÓ¦¸ÃÈ·±£.gitignoreÎļþÖн«Æäɨ³ýÔÚGit¿ÍÕ»Ö®Íâ¡£·­¿ª.gitignoreÎļþ £¬Ìí¼ÓÒÔÏÂÄÚÈÝ£º

Ignore .env file

.env

È»ºóÌá½»ÕâЩ¸ü¸Äµ½Git¿ÍÕ»£º

git add .env

git add .gitignore

git commit -m “Add .env and .gitignore files”

ËÄ¡¢ÐÞ¸ÄLaravelÉèÖÃ

ÔÚÔËÐÐLaravel֮ǰ £¬ÎÒÃÇÐèÒªÔÚ.envÎļþÖÐÐÞ¸ÄÏîÄ¿ÉèÖÃÐÅÏ¢¡£ÔÚÕâ¸öÎļþÖÐ £¬Äã¿ÉÒÔÉèÖÃLaravelµÄÊý¾Ý¿âÅþÁ¬¡¢»º´æЧÀÍ¡¢ÓʼþЧÀ͵ȵÈ¡£

ÀýÈç £¬ÈôÊÇÄãʹÓõÄÊÇMySQLÊý¾Ý¿â £¬ÄÇô¿ÉÒÔÉèÖÃÒÔÏÂÄÚÈÝ£º

DB_CONNECTION=mysql

DB_HOST=127.0.0.1

DB_PORT=3306

DB_DATABASE=mynewlaravel

DB_USERNAME=root

DB_PASSWORD=

ÆäÖÐDB_DATABASE¡¢DB_USERNAMEºÍDB_PASSWORDµÈӦƾ֤Äã×Ô¼ºµÄÐèÇó¾ÙÐÐÐ޸ġ£Íê³Éºó £¬Ìá½»¸ü¸Äµ½Git¿ÍÕ»£º

git add .env

git commit -m “Update Laravel project configuration”

Îå¡¢Ìí¼ÓLaravelÒÀÀµ

ÏÂÒ»²½ £¬ÎÒÃÇÐèÒªÏòLaravelÏîÄ¿ÖÐÌí¼ÓËùÐèµÄÒÀÀµ¡£Laravelͨ¹ýComposerÀ´ÖÎÀíÒÀÀµ £¬Òò´ËÎÒÃÇÐèÒªÏÈÔÚÏîÄ¿¸ùĿ¼ÖÐÔËÐÐÒÔÏÂÏÂÁî £¬ÏÂÔØËùÐèµÄÒÀÀµ£º

composer install

È»ºó £¬½«vendorĿ¼Ìí¼Óµ½Git¿ÍÕ»ÖУº

git add vendor/

git commit -m “Add Laravel dependencies”

Áù¡¢Ìá½»¸ü¸Ä

×îºó £¬ÎÒÃÇÐèÒª½«ËùÓиü¸ÄÌá½»µ½Git¿ÍÕ»ÖУº

git add .

git commit -m “Finalize project setup”

Æß¡¢Íê³É

ÏÖÔÚ £¬LaravelÇéÐÎÒѾ­´î½¨Íê³É²¢ÉÏ´«ÖÁGit¿ÍÕ»ÖС£ÔÚ¿ª·¢Àú³ÌÖÐ £¬Äã¿ÉÒÔͨ¹ýGitÀ´ÖÎÀí´úÂë £¬±ãÓÚ°æ±¾¿ØÖƺÍЭ×÷¿ª·¢¡£

×ÛÉÏËùÊö £¬±¾ÎÄÏÈÈÝÁËÔõÑùʹÓÃGitÀ´´î½¨LaravelÇéÐÎ £¬²¢½«ÆäÉÏ´«ÖÁGit¿ÍÕ»¡£Ï£Íû¶ÔÄãÓÐËù×ÊÖú¡£

ÒÔÉϾÍÊÇgit´î½¨laravelÇéÐεÄÏêϸÄÚÈÝ £¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

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

Ïà¹ØÐÂÎÅ

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

13452372176

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

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

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