{"id":22398,"date":"2024-11-21T15:22:35","date_gmt":"2024-11-21T07:22:35","guid":{"rendered":"https:\/\/fwq.ai\/blog\/22398\/"},"modified":"2024-11-21T15:22:35","modified_gmt":"2024-11-21T07:22:35","slug":"laravel-%e4%bb%80%e4%b9%88%e7%89%88%e6%9c%ac%e5%a5%bd%e7%94%a8","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/22398\/","title":{"rendered":"laravel \u4ec0\u4e48\u7248\u672c\u597d\u7528"},"content":{"rendered":"<p>\u4f5c\u4e3a\u4e00\u6b3e\u6d41\u884c\u7684 php \u6846\u67b6\uff0claravel \u6bcf\u4e2a\u7248\u672c\u90fd\u6709\u5176\u72ec\u7279\u4f18\u52bf\u548c\u7f3a\u9677\u3002\u8981\u60f3\u9009\u62e9\u6700\u597d\u7684\u7248\u672c\uff0c\u6211\u4eec\u9700\u8981\u4e86\u89e3\u6bcf\u4e2a\u7248\u672c\u7684\u4f18\u52bf\u548c\u5f31\u70b9\u3002<\/p>\n<p>Laravel 5.1<\/p>\n<p>Laravel 5.1 \u662f\u7b2c\u4e00\u4e2a\u4f7f\u7528\u957f\u671f\u652f\u6301\uff08LTS\uff09\u6a21\u5f0f\u7684\u7248\u672c\u3002\u4e0e\u5176\u4ed6\u7248\u672c\u76f8\u6bd4\uff0c\u5b83\u66f4\u52a0\u7a33\u5b9a\uff0c\u56e0\u4e3a\u9664\u4e86\u4fee\u8865\u5b89\u5168\u6f0f\u6d1e\u548c\u9519\u8bef\u5916\uff0c\u5b83\u4e0d\u518d\u5f15\u5165\u65b0\u529f\u80fd\u3002\u6b64\u7248\u672c\u5f15\u5165\u4e86 Laravel \u8de8\u7ad9\u8bf7\u6c42\u4f2a\u9020\uff08CSRF\uff09\u4fdd\u62a4\u3001\u4e8b\u4ef6\u3001\u8c03\u5ea6\u7a0b\u5e8f\u548c\u4efb\u52a1\u7b49\u65b0\u529f\u80fd\u3002\u5982\u679c\u60a8\u6b63\u5728\u6784\u5efa\u4e00\u4e2a\u957f\u671f\u8fd0\u884c\u7684\u9879\u76ee\uff0cLaravel 5.1 \u5c06\u662f\u4e00\u4e2a\u660e\u667a\u7684\u9009\u62e9\u3002<\/p>\n<p>Laravel 5.2<\/p>\n<p>Laravel 5.2 \u5f15\u5165\u4e86\u65b0\u7684\u961f\u5217\u7cfb\u7edf\u548c\u4efb\u52a1\u8c03\u5ea6\u7a0b\u5e8f\u3002\u8fd9\u4e9b\u529f\u80fd\u4f59\u4e0b\u4e86\u5bf9\u957f\u65f6\u95f4\u8fd0\u884c\u7684\u64cd\u4f5c\u8fdb\u884c\u63a7\u5236\u7684\u529f\u80fd\uff0c\u5e76\u4f7f\u7f16\u5199\u5f02\u6b65\u4ee3\u7801\u66f4\u52a0\u5bb9\u6613\u3002\u6b64\u7248\u672c\u8fd8\u5f15\u5165\u4e86\u8986\u76d6\u672c\u673a\u9a8c\u8bc1\u5668\u89c4\u5219\u7684\u80fd\u529b\u3002<\/p>\n<p>Laravel 5.3<\/p>\n<p>Laravel 5.3 \u5f15\u5165\u4e86 Laravel Passport\uff0c\u8fd9\u662f\u4e00\u4e2a\u5185\u7f6e\u7684\u8f7b\u91cf\u7ea7\u8eab\u4efd\u9a8c\u8bc1\u548c OAuth \u670d\u52a1\u5668\u3002\u6b64\u7248\u672c\u8fd8\u589e\u5f3a\u4e86 Eloquent ORM\uff0c\u4f7f\u5176\u66f4\u52a0\u5bb9\u6613\u5b9e\u73b0\u591a\u6001\u5173\u7cfb\u548c\u5173\u7cfb\u6570\u636e\u7684\u64cd\u4f5c\u3002\u6b64\u5916\uff0cLaravel 5.3 \u8fd8\u5f15\u5165\u4e86\u53ef\u8c03\u5ea6\u7684\u95ed\u5305\uff08Closure\uff09\u4f5c\u4e3a\u8def\u7531\u7684\u4e2d\u95f4\u4ef6\u3002<\/p>\n<p>Laravel 5.4<\/p>\n<p>Laravel 5.4 \u5f15\u5165\u4e86 Laravel Dusk\uff0c\u8fd9\u662f\u4e00\u4e2a\u81ea\u52a8\u5316\u6d4f\u89c8\u5668\u6d4b\u8bd5\u5de5\u5177\uff0c\u5b83\u53ef\u4ee5\u5e2e\u52a9\u60a8\u6d4b\u8bd5\u60a8\u7684\u5e94\u7528\u7a0b\u5e8f\u7684\u6574\u4e2a\u6d4f\u89c8\u5668\u3002\u6b64\u7248\u672c\u8fd8\u66f4\u65b0\u4e86\u8def\u7531\u548c\u5bb9\u5668\u3002\u6b64\u5916\uff0c\u5b83\u8fd8\u5f15\u5165\u4e86\u66f4\u52a0\u806a\u660e\u7684\u96c6\u5408\uff08Collection\uff09\u548c\u6587\u4ef6\u5b58\u50a8\u5668\uff08Filesystem\uff09\u529f\u80fd\u3002<\/p>\n<p>Laravel 5.5<\/p>\n<p>Laravel 5.5 \u5f15\u5165\u4e86\u81ea\u52a8\u53d1\u73b0\u529f\u80fd\u3002\u8fd9\u610f\u5473\u7740 Laravel \u77e5\u9053\u5982\u4f55\u81ea\u52a8\u7ed1\u5b9a\u670d\u52a1\u63d0\u4f9b\u5546\u548c\u5305\uff0c\u4f7f\u5f97\u60a8\u53ef\u4ee5\u82b1\u8d39\u66f4\u5c11\u7684\u65f6\u95f4\u5728\u914d\u7f6e\u65b9\u9762\u3002\u6b64\u7248\u672c\u8fd8\u5f15\u5165\u4e86\u66f4\u52a0\u53ef\u5b9a\u5236\u7684\u54cd\u5e94\u683c\u5f0f\u5316\u7a0b\u5e8f\uff0c\u4f7f\u60a8\u53ef\u4ee5\u66f4\u8f7b\u677e\u5730\u5904\u7406 API \u54cd\u5e94\u3002<\/p>\n<p>Laravel 5.6<\/p>\n<p>Laravel 5.6 \u5f15\u5165\u4e86\u8be5\u6846\u67b6\u4e2d\u6700\u957f\u547d\u540d\u7684\u529f\u80fd\u4e4b\u4e00\uff1a\u201cLaravel Eloquent ORM \u5bf9 SQL \u6162\u67e5\u8be2\u7684\u652f\u6301\u201d\u3002\u6b64\u7248\u672c\u8fd8\u5f15\u5165\u4e86 Dusk \u652f\u6301 Mysql\u3001Sqlite \u548c Postgresql \u6570\u636e\u5e93\uff0c\u5e76\u4e14\u4f7f Eloquent ORM \u64cd\u4f5c\u96c6\u5408\u66f4\u52a0\u5bb9\u6613\u3002<\/p>\n<p>Laravel 5.7<\/p>\n<p>Laravel 5.7 \u5f15\u5165\u4e86\u66f4\u597d\u7684\u8def\u7531\u7f13\u5b58\u548c\u5feb\u901f\u5e94\u7528\u7a0b\u5e8f\u5e03\u5c40\u751f\u6210\u3002\u6b64\u7248\u672c\u8fd8\u66f4\u65b0\u4e86\u7279\u5b9a\u4e8e Blade \u7684\u201cstack\u201d\u547d\u4ee4\uff0c\u4ee5\u4f7f\u5e03\u5c40\u66f4\u52a0\u5bb9\u6613\u3002Laravel 5.7 \u4e5f\u5f15\u5165\u4e86 PSR-16 \u7f13\u5b58\u4e2d\u7684\u6807\u8bb0\u5316\u6807\u8bc6\u7b26\uff08token\uff09\uff0c\u4f7f\u60a8\u53ef\u4ee5\u4f7f\u7528\u66f4\u5feb\u7684\u7f13\u5b58\uff0c\u5e76\u4e14\u66f4\u5bb9\u6613\u62c6\u5378\u6216\u66f4\u6539\u7f13\u5b58\u673a\u5236\u3002<\/p>\n<p>Laravel 5.8<\/p>\n<p>Laravel 5.8 \u5f15\u5165\u4e86\u8c37\u6b4c ReCAPTCHA \u4e0e Laravel \u7684\u5185\u7f6e\u9a8c\u8bc1\u96c6\u6210\uff0c\u4f7f\u60a8\u53ef\u4ee5\u4f7f\u7528 Google \u7684\u53cd\u5783\u573e\u90ae\u4ef6\u670d\u52a1\u6765\u4fdd\u62a4\u60a8\u7684\u5e94\u7528\u7a0b\u5e8f\u3002\u6b64\u7248\u672c\u8fd8\u4f7f\u5f97 Eloquent \u8bf7\u6c42\u66f4\u52a0\u5feb\u901f\uff0c\u540c\u65f6\u8fd8\u5f15\u5165\u4e86\u53ef\u540c\u65f6\u4f7f\u7528\u77ed\u4fe1\u548c\u901a\u77e5\u7684\u901a\u77e5\u901a\u9053\u590d\u5199\u3002<\/p>\n<p>\u7ed3\u8bba<\/p>\n<p>\u6bcf\u4e2a Laravel \u7248\u672c\u90fd\u6709\u5176\u81ea\u8eab\u7684\u4f18\u52bf\u548c\u7f3a\u9677\u3002\u8981\u9009\u62e9\u6700\u597d\u7684\u7248\u672c\uff0c\u60a8\u9700\u8981\u4e86\u89e3\u6bcf\u4e2a\u7248\u672c\u7684\u6539\u8fdb\u3002\u5982\u679c\u60a8\u6b63\u5728\u6784\u5efa\u4e00\u4e2a\u957f\u671f\u8fd0\u884c\u7684\u9879\u76ee\uff0c\u90a3\u4e48 Laravel 5.1 \u5c06\u662f\u4e00\u4e2a\u660e\u667a\u7684\u9009\u62e9\u3002\u800c\u5982\u679c\u60a8\u60f3\u6784\u5efa\u4e00\u4e2a\u5feb\u901f\u548c\u5bb9\u6613\u6ee1\u8db3\u9700\u6c42\u7684\u5c0f\u578b\u9879\u76ee\uff0cLaravel 5.8 \u53ef\u80fd\u662f\u6700\u597d\u7684\u9009\u62e9\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662flaravel \u4ec0\u4e48\u7248\u672c\u597d\u7528\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4f5c\u4e3a\u4e00\u6b3e\u6d41\u884c\u7684 php \u6846\u67b6\uff0claravel \u6bcf\u4e2a\u7248\u672c\u90fd\u6709\u5176\u72ec\u7279\u4f18\u52bf\u548c\u7f3a\u9677\u3002\u8981\u60f3\u9009\u62e9\u6700\u597d\u7684\u7248\u672c\uff0c\u6211\u4eec\u9700\u8981\u4e86\u89e3\u6bcf\u4e2a\u7248\u672c\u7684\u4f18\u52bf\u548c\u5f31\u70b9\u3002 Laravel 5.1 Laravel 5.1 \u662f\u7b2c\u4e00\u4e2a\u4f7f\u7528\u957f\u671f\u652f\u6301\uff08LTS\uff09\u6a21\u5f0f\u7684\u7248\u672c\u3002\u4e0e\u5176\u4ed6\u7248\u672c\u76f8\u6bd4\uff0c\u5b83\u66f4\u52a0\u7a33\u5b9a\uff0c\u56e0\u4e3a\u9664\u4e86\u4fee\u8865\u5b89\u5168\u6f0f\u6d1e\u548c\u9519\u8bef\u5916\uff0c\u5b83\u4e0d\u518d\u5f15\u5165\u65b0\u529f\u80fd\u3002\u6b64\u7248\u672c\u5f15\u5165\u4e86 Laravel \u8de8\u7ad9\u8bf7\u6c42\u4f2a\u9020\uff08CSRF\uff09\u4fdd\u62a4\u3001\u4e8b\u4ef6\u3001\u8c03\u5ea6\u7a0b\u5e8f\u548c\u4efb\u52a1\u7b49\u65b0\u529f\u80fd\u3002\u5982\u679c\u60a8\u6b63\u5728\u6784\u5efa\u4e00\u4e2a\u957f\u671f\u8fd0\u884c\u7684\u9879\u76ee\uff0cLaravel 5.1 \u5c06\u662f\u4e00\u4e2a\u660e\u667a\u7684\u9009\u62e9\u3002 Laravel 5.2 Laravel 5.2 \u5f15\u5165\u4e86\u65b0\u7684\u961f\u5217\u7cfb\u7edf\u548c\u4efb\u52a1\u8c03\u5ea6\u7a0b\u5e8f\u3002\u8fd9\u4e9b\u529f\u80fd\u4f59\u4e0b\u4e86\u5bf9\u957f\u65f6\u95f4\u8fd0\u884c\u7684\u64cd\u4f5c\u8fdb\u884c\u63a7\u5236\u7684\u529f\u80fd\uff0c\u5e76\u4f7f\u7f16\u5199\u5f02\u6b65\u4ee3\u7801\u66f4\u52a0\u5bb9\u6613\u3002\u6b64\u7248\u672c\u8fd8\u5f15\u5165\u4e86\u8986\u76d6\u672c\u673a\u9a8c\u8bc1\u5668\u89c4\u5219\u7684\u80fd\u529b\u3002 Laravel 5.3 Laravel 5.3 \u5f15\u5165\u4e86 Laravel Passport\uff0c\u8fd9\u662f\u4e00\u4e2a\u5185\u7f6e\u7684\u8f7b\u91cf\u7ea7\u8eab\u4efd\u9a8c\u8bc1\u548c OAuth \u670d\u52a1\u5668\u3002\u6b64\u7248\u672c\u8fd8\u589e\u5f3a\u4e86 Eloquent ORM\uff0c\u4f7f\u5176\u66f4\u52a0\u5bb9\u6613\u5b9e\u73b0\u591a\u6001\u5173\u7cfb\u548c\u5173\u7cfb\u6570\u636e\u7684\u64cd\u4f5c\u3002\u6b64\u5916\uff0cLaravel 5.3 \u8fd8\u5f15\u5165\u4e86\u53ef\u8c03\u5ea6\u7684\u95ed\u5305\uff08Closure\uff09\u4f5c\u4e3a\u8def\u7531\u7684\u4e2d\u95f4\u4ef6\u3002 Laravel 5.4 Laravel 5.4 \u5f15\u5165\u4e86 Laravel Dusk\uff0c\u8fd9\u662f\u4e00\u4e2a\u81ea\u52a8\u5316\u6d4f\u89c8\u5668\u6d4b\u8bd5\u5de5\u5177\uff0c\u5b83\u53ef\u4ee5\u5e2e\u52a9\u60a8\u6d4b\u8bd5\u60a8\u7684\u5e94\u7528\u7a0b\u5e8f\u7684\u6574\u4e2a\u6d4f\u89c8\u5668\u3002\u6b64\u7248\u672c\u8fd8\u66f4\u65b0\u4e86\u8def\u7531\u548c\u5bb9\u5668\u3002\u6b64\u5916\uff0c\u5b83\u8fd8\u5f15\u5165\u4e86\u66f4\u52a0\u806a\u660e\u7684\u96c6\u5408\uff08Collection\uff09\u548c\u6587\u4ef6\u5b58\u50a8\u5668\uff08Filesystem\uff09\u529f\u80fd\u3002 Laravel 5.5 Laravel 5.5 \u5f15\u5165\u4e86\u81ea\u52a8\u53d1\u73b0\u529f\u80fd\u3002\u8fd9\u610f\u5473\u7740 Laravel \u77e5\u9053\u5982\u4f55\u81ea\u52a8\u7ed1\u5b9a\u670d\u52a1\u63d0\u4f9b\u5546\u548c\u5305\uff0c\u4f7f\u5f97\u60a8\u53ef\u4ee5\u82b1\u8d39\u66f4\u5c11\u7684\u65f6\u95f4\u5728\u914d\u7f6e\u65b9\u9762\u3002\u6b64\u7248\u672c\u8fd8\u5f15\u5165\u4e86\u66f4\u52a0\u53ef\u5b9a\u5236\u7684\u54cd\u5e94\u683c\u5f0f\u5316\u7a0b\u5e8f\uff0c\u4f7f\u60a8\u53ef\u4ee5\u66f4\u8f7b\u677e\u5730\u5904\u7406 API \u54cd\u5e94\u3002 Laravel 5.6 Laravel 5.6 \u5f15\u5165\u4e86\u8be5\u6846\u67b6\u4e2d\u6700\u957f\u547d\u540d\u7684\u529f\u80fd\u4e4b\u4e00\uff1a\u201cLaravel Eloquent ORM \u5bf9 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-22398","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/22398","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=22398"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/22398\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=22398"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=22398"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=22398"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}