{"id":1058,"date":"2015-06-01T13:13:39","date_gmt":"2015-06-01T05:13:39","guid":{"rendered":"http:\/\/www.poloo.org\/?p=1058"},"modified":"2015-06-01T13:15:17","modified_gmt":"2015-06-01T05:15:17","slug":"laravel5-%e6%89%be%e4%b8%8d%e5%88%b0form-%e7%b1%bb%e7%9a%84%e8%a7%a3%e5%86%b3%e5%8a%9e%e6%b3%95","status":"publish","type":"post","link":"https:\/\/www.poloo.org\/?p=1058","title":{"rendered":"Laravel5 \u627e\u4e0d\u5230Form \u7c7b\u7684\u89e3\u51b3\u529e\u6cd5"},"content":{"rendered":"<p>\u5728Laravel5\u4e2d\u7684\u6a21\u677f\u5185\u4f7f\u7528From \u521b\u5efa\u8868\u5355\u7684\u65f6\u5019\u4f1a\u63d0\u793aClass &#8216;Form&#8217; not found\uff0c\u662f\u56e0\u4e3a\u9ed8\u8ba4\u60c5\u51b5\u4e0bLaravel5\u4e0d\u518d\u5d4c\u5165 Form \u548c Html\u3002<\/p>\n<p><a href=\"http:\/\/www.poloo.org\/uploads\/\/2015\/06\/not-form.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-1059\" src=\"http:\/\/www.poloo.org\/uploads\/\/2015\/06\/not-form-1024x265.png\" alt=\"not form\" width=\"640\" height=\"166\" srcset=\"https:\/\/www.poloo.org\/uploads\/2015\/06\/not-form-1024x265.png 1024w, https:\/\/www.poloo.org\/uploads\/2015\/06\/not-form-300x78.png 300w, https:\/\/www.poloo.org\/uploads\/2015\/06\/not-form.png 2000w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p>\u8868\u5355\u751f\u6210\u5668\u662f\u5355\u72ec\u7684\u5305\uff0c\u9700\u8981\u5bfc\u5165\u00a0\u201cilluminate\/html\u201d<\/p>\n<p>1. \u6253\u5f00 composer.json \u6dfb\u52a0\uff1a<\/p>\n<pre class=\"perl\"><span class=\"string\">\"illuminate\/html\"<\/span>: <span class=\"string\">\"5.<span class=\"variable\">*\"<\/span><\/span><\/pre>\n<p>\u4fdd\u5b58\u540e\u6267\u884c\uff1acomposer update \u8fdb\u884c\u66f4\u65b0\u3002<\/p>\n<p>2.\u5b89\u88c5\u201cIlluminate\\Html\u201d \u4e4b\u540e\u66f4\u65b0 config\/app.php \u6587\u4ef6\uff1a<\/p>\n<p>providers\u5185\u6dfb\u52a0\uff1a<\/p>\n<pre><span class=\"string\">'Illuminate\\Html\\HtmlServiceProvider'<\/span>,\r\n<\/pre>\n<p>aliases\u5185\u6dfb\u52a0\uff1a<\/p>\n<pre class=\"prettyprint php\"><code class=\"language-php\"><span class=\"string\">'Html'<\/span> =&gt; <span class=\"string\">'Illuminate\\Html\\HtmlFacade'<\/span>,\r\n<span class=\"string\">'Form'<\/span> =&gt; <span class=\"string\">'Illuminate\\Html\\FormFacade'<\/span>,\r\n<\/code><\/pre>\n<p>\u6267\u884c composer dump-autoload \u540e \u5c31\u53ef\u4ee5\u4f7f\u7528Form \u6784\u5efa\u8868\u5355\u4e86\u3002<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728Laravel5\u4e2d\u7684\u6a21\u677f\u5185\u4f7f\u7528From \u521b\u5efa\u8868\u5355\u7684\u65f6\u5019\u4f1a\u63d0\u793aCla&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,18],"tags":[167,36],"class_list":["post-1058","post","type-post","status-publish","format-standard","hentry","category-Note","category-Php","tag-laravel","tag-php-2"],"_links":{"self":[{"href":"https:\/\/www.poloo.org\/index.php?rest_route=\/wp\/v2\/posts\/1058","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.poloo.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.poloo.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.poloo.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.poloo.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1058"}],"version-history":[{"count":0,"href":"https:\/\/www.poloo.org\/index.php?rest_route=\/wp\/v2\/posts\/1058\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.poloo.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1058"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.poloo.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1058"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.poloo.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1058"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}