һЩÖ÷ÒªµÄLaravel¿ò¼Ü×¢ÊÍ
Ëæ×Å»¥ÁªÍøÊÖÒÕµÄÒ»Ö±Éú³¤£¬webÓ¦ÓóÌÐòµÄ¿ª·¢Ò²±äµÃÔ½À´Ô½¼òÆӺ͸ßЧ¡£È»¶ø£¬web¿ª·¢µÄÀú³ÌÖо³£ÐèҪʹÓÃÒ»¸ö¿ò¼ÜÀ´¼ÓËÙ¿ª·¢£¬ÒÔ±ã¸ü¿ì¸ü¸ßЧµØ¹¹½¨Ó¦ÓóÌÐò¡£ÆäÖÐÒ»¸öÊ¢ÐеÄweb¿ò¼ÜÊÇlaravel£¬ËüʹÓÃphp±àд£¬²¢½ÓÄÉÁËÏÖ´úµÄmvcÉè¼Æģʽ¡£
Laravel¿ò¼ÜºÜÈÝÒ×ÉÏÊÖ£¬ÓÉÓÚËü¾ßÓÐÒ×ÓÚѧϰºÍÃ÷È·µÄÓï·¨ºÍAPI¡£Ëü»¹ÄÚÖÃÁË´ó×ڵĹ¦Ð§Ä£¿é£¬ÈçÈÏÖ¤¡¢ÊÚȨ¡¢»º´æ¡¢ÊÂÎñ¡¢ÐÐÁкÍ·Óɵȡ£²»¹ý£¬¹ØÓÚһЩ¿ª·¢ÕßÀ´Ëµ£¬ÔĶÁLaravel¿ò¼ÜÔ´ÂëÖеÄ×¢ÊÍÊÇÒ»¸ö¸üºÃµÄѧϰҪÁì¡£
Laravel¿ò¼ÜÔ´ÂëÖеÄ×¢ÊÍÌṩÁËÐí¶àÓмÛÖµµÄÐÅÏ¢£¬°üÀ¨Ã¿¸öÒªÁìµÄ×÷Óá¢ÊäÈë²ÎÊýºÍ·µ»ØÀàÐ͵ȡ£Òò´Ë£¬Ñ§Ï°Laravel¿ò¼ÜÔ´ÂëÖеÄ×¢ÊÍ¿ÉÒÔ×ÊÖú¿ª·¢Õ߸üºÃµØÃ÷È·¿ò¼ÜµÄÄÚ²¿ÊÂÇéÔÀí£¬²¢ÇÒʹËûÃÇÄܹ»¸üºÃµØÔÚÓ¦ÓóÌÐòÖÐʹÓÃLaravel¿ò¼Ü¡£
ÔÚÔĶÁLaravel¿ò¼ÜÔ´Âë×¢ÊÍʱ£¬ÄãÐèÒªÊìϤһЩ»ù±¾µÄPHP¿´·¨ºÍÓï·¨¡£ÈôÊÇÄã²»ÊìϤPHPÓïÑÔ£¬Äã¿ÉÒÔÏÈѧϰһЩ»ù±¾µÄPHP֪ʶ£¬È»ºó×îÏÈѧϰLaravel¿ò¼Ü¡£
ÔÚ×îÏÈѧϰ֮ǰ£¬ÄãÐèҪͨ¹ýcomposer×°ÖÃLaravel¿ò¼Ü¡£×°ÖÃÍê³Éºó£¬Äã¾Í¿ÉÒÔ×îÏÈÔĶÁÔ´Âë×¢ÊÍÁË¡£
ÒÔÏÂÊÇһЩÖ÷ÒªµÄLaravel¿ò¼Ü×¢ÊÍ£º
app/Http/Controllers/Controller.php
ÕâÊÇLaravel¿ò¼ÜµÄ»ù´¡¿ØÖÆÆ÷£¬ËùÓеĿØÖÆÆ÷¶¼Ó¦¸ÃÀ©Õ¹Õâ¸ö»ù´¡¿ØÖÆÆ÷¡£×¢ÊÍ˵Ã÷Îú¸Ã¿ØÖÆÆ÷µÄ×÷Ó㬲¢ÌṩÁËһЩʵÏָÿØÖÆÆ÷µÄʾÀý´úÂë¡£
app/Http/Kernel.php
Õâ¸öÎļþ½ç˵ÁËLaravel¿ò¼ÜµÄÈ«¾ÖÖÐÑë¼þ¡£×¢ÊÍÌṩÁËÿÆäÖÐÑë¼þµÄ×÷ÓúÍʵÏÖ·½·¨¡£
app/Http/Requests/
Õâ¸öÎļþ¼Ð°üÀ¨ÁËLaravel¿ò¼ÜµÄ±íµ¥ÑéÖ¤Æ÷¡£×¢ÊÍÌṩÁËÿ¸öÑéÖ¤Æ÷µÄ×÷ÓúÍʵÏÖ·½·¨¡£
app/Providers/
Õâ¸öÎļþ¼Ð°üÀ¨Laravel¿ò¼ÜµÄЧÀÍÌṩÕß¡£×¢ÊÍÌṩÁËÿ¸öЧÀÍÌṩÕßµÄ×÷ÓúÍʵÏÖ·½·¨¡£Ð§ÀÍÌṩÕßÊÇLaravel¿ò¼ÜÖÐÒ»¸öºÜÖ÷ÒªµÄ¹¦Ð§Ä£¿é£¬Ëü¿ÉÒÔ×¢²áÓ¦ÓóÌÐòËùÐèµÄЧÀͺ͵¥Àý¹¤¾ß¡£
database/migrations/
Õâ¸öÎļþ¼Ð°üÀ¨ÁËLaravel¿ò¼ÜµÄÊý¾Ý¿âǨáãÎļþ¡£×¢ÊÍÌṩÁËÿ¸öǨáãÎļþµÄ×÷ÓúÍʵÏÖ·½·¨¡£Êý¾Ý¿âǨáãÊÇLaravel¿ò¼ÜÖÐÒ»¸öºÜÖ÷ÒªµÄ¹¦Ð§Ä£¿é£¬Ëü¿ÉÒÔÈÃÄãÔÚ²»ÆÆËðÄãÏÖÓÐÊý¾ÝµÄÇéÐÎÏ£¬ÇáËɸü¸ÄÄãµÄÊý¾Ý¿â½á¹¹¡£
routes/
Õâ¸öÎļþ¼Ð°üÀ¨Laravel¿ò¼ÜµÄ·ÓÉÎļþ¡£×¢ÊÍÌṩÁËÿ¸ö·ÓɵÄ×÷ÓúÍʵÏÖ·½·¨¡£Â·ÓÉÊÇLaravel¿ò¼ÜÖеÄÒ»¸öÖ÷Òª×é³É²¿·Ö£¬Ëü¿ÉÒÔ½«URIÓ³Éäµ½Ö¸¶¨µÄ¿ØÖÆÆ÷ÒªÁì¡£
resources/views/
Õâ¸öÎļþ¼Ð°üÀ¨Laravel¿ò¼ÜµÄÊÓͼģ°å¡£×¢ÊÍÌṩÁËÿ¸öÄ£°åµÄ×÷ÓúÍʵÏÖ·½·¨¡£ÊÓͼģ°åÊÇLaravel¿ò¼ÜÖÐÒ»¸öºÜÖ÷ÒªµÄ¹¦Ð§Ä£¿é£¬Ëü¿ÉÒÔ×ÊÖúÄ㽨ÉèºÍչʾWeb½çÃæ¡£
ѧϰLaravel¿ò¼Ü×¢ÊÍÐèÒªÒ»¶¨µÄÄÍÐĺÍʱ¼äͶÈë¡£¿ÉÊÇ£¬Ñ§Ï°Ò»ÖÖеÄÊÖÒÕ£¬ÕÆÎÕÒ»¸öÐµĹ¤¾ß£¬ÈκÎʱ¼ä¶¼ÖµµÃÖ§¸¶¡£ÎÞÂÛÊÇÐÂÊÖÕվɸ߽׿ª·¢Õߣ¬Ñ§Ï°Laravel¿ò¼ÜÖеÄ×¢ÊͶ¼¿ÉÒÔ×ÊÖúËûÃǸüºÃµØÕÆÎոÿò¼Ü£¬´Ó¶ø¸üºÃµØ¿ª·¢WebÓ¦ÓóÌÐò¡£
ÒÔÉϾÍÊÇһЩÖ÷ÒªµÄLaravel¿ò¼Ü×¢Ê͵ÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡