{"id":900,"date":"2021-10-28T11:51:54","date_gmt":"2021-10-28T03:51:54","guid":{"rendered":"https:\/\/www.cxybj.com\/?p=900"},"modified":"2021-10-28T11:53:38","modified_gmt":"2021-10-28T03:53:38","slug":"laravel-%e8%b5%84%e6%ba%90%e8%b7%af%e7%94%b1id%e4%b8%8e%e6%b3%a8%e5%85%a5%e6%b3%a8%e6%84%8f%e4%ba%8b%e9%a1%b9","status":"publish","type":"post","link":"https:\/\/www.cxybj.com\/?p=900","title":{"rendered":"Laravel \u8d44\u6e90\u8def\u7531id\u4e0e\u6ce8\u5165\u6ce8\u610f\u4e8b\u9879"},"content":{"rendered":"<p>\u4f8b\u5982\u8def\u7531\u547d\u540dweb.php\u91cc\u662f product<\/p>\n<p>\u90a3\u4f60\u8d44\u6e90\u8def\u7531\u91ccuse\u6a21\u578b\u540eProudct $product\u8fd9\u6837\u624d\u4f1a\u8fd4\u56de\u7ed3\u679c$\u540e\u7684\u540d\u5b57\u8981\u548c\u547d\u540d\u76f8\u540c<\/p>\n<p>\u5426\u5219\u8fd4\u56de\u7684\u662f\u7a7a\u3002<\/p>\n<p>\u67e5\u8be2\u547d\u540d\u65b9\u6cd5\uff1aphp artisan route:list<\/p>\n<p>&nbsp;<\/p>\n<p>\u4f8b\u5982\u7ea2\u8272\u90e8\u5206\u5fc5\u987b\u76f8\u540c<\/p>\n<p>Route::resource(<span style=\"color: #ff0000;\">&#8216;productcategory<\/span>&#8216;,&#8217;Admin\\ProductCategoryController&#8217;);<\/p>\n<pre>public function edit(ProductCategory $<span style=\"color: #ff0000;\">productcategory<\/span>)\r\n{\r\n    dd($productcategory);\r\n}\r\n\r\n\r\n<\/pre>\n<pre id=\"sf-dump-1782278166\" class=\"sf-dump\" tabindex=\"0\" data-indent-pad=\"  \"><samp class=\"sf-dump-expanded\" data-depth=\"1\">  #<span class=\"sf-dump-protected\" title=\"Protected property\">table<\/span>: \"<span class=\"sf-dump-str\" title=\"16 characters\">product_category<\/span>\"\r\n  +<span class=\"sf-dump-public\" title=\"Public property\">timestamps<\/span>: <span class=\"sf-dump-const\">true<\/span>\r\n  #<span class=\"sf-dump-protected\" title=\"Protected property\">primaryKey<\/span>: \"<span class=\"sf-dump-str\" title=\"3 characters\">cid<\/span>\"\r\n  #<span class=\"sf-dump-protected\" title=\"Protected property\">guarded<\/span>: []\r\n  #<span class=\"sf-dump-protected\" title=\"Protected property\">fillable<\/span>: []\r\n  #<span class=\"sf-dump-protected\" title=\"Protected property\">connection<\/span>: \"<span class=\"sf-dump-str\" title=\"5 characters\">mysql<\/span>\"\r\n  #<span class=\"sf-dump-protected\" title=\"Protected property\">keyType<\/span>: \"<span class=\"sf-dump-str\" title=\"3 characters\">int<\/span>\"\r\n  +<span class=\"sf-dump-public\" title=\"Public property\">incrementing<\/span>: <span class=\"sf-dump-const\">true<\/span>\r\n  #<span class=\"sf-dump-protected\" title=\"Protected property\">with<\/span>: []\r\n  #<span class=\"sf-dump-protected\" title=\"Protected property\">withCount<\/span>: []\r\n  #<span class=\"sf-dump-protected\" title=\"Protected property\">perPage<\/span>: <span class=\"sf-dump-num\">15<\/span>\r\n  +<span class=\"sf-dump-public\" title=\"Public property\">exists<\/span>: <span class=\"sf-dump-const\">true<\/span>\r\n  +<span class=\"sf-dump-public\" title=\"Public property\">wasRecentlyCreated<\/span>: <span class=\"sf-dump-const\">false<\/span>\r\n  #<span class=\"sf-dump-protected\" title=\"Protected property\">attributes<\/span>: <span class=\"sf-dump-note\">array:12<\/span> []\r\n  #<span class=\"sf-dump-protected\" title=\"Protected property\">original<\/span>: <span class=\"sf-dump-note\">array:12<\/span> []\r\n  #<span class=\"sf-dump-protected\" title=\"Protected property\">changes<\/span>: []\r\n  #<span class=\"sf-dump-protected\" title=\"Protected property\">casts<\/span>: []\r\n  #<span class=\"sf-dump-protected\" title=\"Protected property\">dates<\/span>: []\r\n  #<span class=\"sf-dump-protected\" title=\"Protected property\">dateFormat<\/span>: <span class=\"sf-dump-const\">null<\/span>\r\n  #<span class=\"sf-dump-protected\" title=\"Protected property\">appends<\/span>: []\r\n  #<span class=\"sf-dump-protected\" title=\"Protected property\">dispatchesEvents<\/span>: []\r\n  #<span class=\"sf-dump-protected\" title=\"Protected property\">observables<\/span>: []\r\n  #<span class=\"sf-dump-protected\" title=\"Protected property\">relations<\/span>: []\r\n  #<span class=\"sf-dump-protected\" title=\"Protected property\">touches<\/span>: []\r\n  #<span class=\"sf-dump-protected\" title=\"Protected property\">hidden<\/span>: []\r\n  #<span class=\"sf-dump-protected\" title=\"Protected property\">visible<\/span>: []<\/samp><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u4f8b\u5982\u8def\u7531\u547d\u540dweb.php\u91cc\u662f product \u90a3\u4f60\u8d44\u6e90\u8def\u7531 &hellip; <a href=\"https:\/\/www.cxybj.com\/?p=900\" class=\"more-link\">Read More<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[135,2],"tags":[],"_links":{"self":[{"href":"https:\/\/www.cxybj.com\/index.php?rest_route=\/wp\/v2\/posts\/900"}],"collection":[{"href":"https:\/\/www.cxybj.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cxybj.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cxybj.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cxybj.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=900"}],"version-history":[{"count":1,"href":"https:\/\/www.cxybj.com\/index.php?rest_route=\/wp\/v2\/posts\/900\/revisions"}],"predecessor-version":[{"id":901,"href":"https:\/\/www.cxybj.com\/index.php?rest_route=\/wp\/v2\/posts\/900\/revisions\/901"}],"wp:attachment":[{"href":"https:\/\/www.cxybj.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=900"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cxybj.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=900"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cxybj.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=900"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}