{"id":681,"date":"2026-04-26T10:37:23","date_gmt":"2026-04-26T01:37:23","guid":{"rendered":"https:\/\/kitayama.jp\/?p=681"},"modified":"2026-04-26T10:37:24","modified_gmt":"2026-04-26T01:37:24","slug":"laravel%e3%81%ae%e3%83%ab%e3%83%bc%e3%83%86%e3%82%a3%e3%83%b3%e3%82%b0%e3%81%a7%e3%81%a9%e3%81%86%e3%81%97%e3%81%a6%e3%82%82%e3%83%90%e3%83%83%e3%83%86%e3%82%a3%e3%83%b3%e3%82%b0%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"https:\/\/kitayama.jp\/?p=681","title":{"rendered":"Laravel\u306e\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u3067\u3069\u3046\u3057\u3066\u3082\u30d0\u30c3\u30c6\u30a3\u30f3\u30b0\u3059\u308b\u305d\u306e\u56de\u907f\u65b9\u6cd5"},"content":{"rendered":"\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>Route::middleware([&#39;auth&#39;])-&gt;group(function () {\n    Route::get(&#39;\/shop\/products\/create&#39;, [ShopProductController::class, &#39;create&#39;])-&gt;name(&#39;shop.products.create&#39;);\n    Route::get(&#39;\/shop\/products&#39;, [ShopProductController::class, &#39;index&#39;])-&gt;name(&#39;shop.products.index&#39;);\n    Route::post(&#39;\/shop\/products&#39;, [ShopProductController::class, &#39;store&#39;])-&gt;name(&#39;shop.products.store&#39;);\n    Route::get(&#39;\/shop\/products\/{product}\/edit&#39;, [ShopProductController::class, &#39;edit&#39;])-&gt;name(&#39;shop.products.edit&#39;);\n    Route::get(&#39;\/shop\/products\/{product}&#39;, [ShopProductController::class, &#39;show&#39;])-&gt;name(&#39;shop.products.show&#39;);\n    Route::put(&#39;\/shop\/products\/{product}&#39;, [ShopProductController::class, &#39;update&#39;])-&gt;name(&#39;shop.products.update&#39;);\n    Route::get(&#39;\/shop\/create&#39;, [ShopController::class, &#39;create&#39;])-&gt;name(&#39;shop.create&#39;);\n    Route::get(&#39;\/shop&#39;, [ShopController::class, &#39;index&#39;])-&gt;name(&#39;shop.index&#39;);\n    Route::post(&#39;\/shop&#39;, [ShopController::class, &#39;store&#39;])-&gt;name(&#39;shop.store&#39;);\n    Route::get(&#39;\/shop\/edit&#39;, [ShopController::class, &#39;edit&#39;])-&gt;name(&#39;shop.edit&#39;);\n    Route::put(&#39;\/shop&#39;, [ShopController::class, &#39;update&#39;])-&gt;name(&#39;shop.update&#39;);\n});<\/code><\/pre><\/div>\n\n\n\n<p>\u4e0a\u3067\u3001\/shop\/products\/create\u3000\u304c\u3069\u3046\u3057\u3066\u3082404\u306b\u306a\u308b\u3002<\/p>\n\n\n\n<p>\u7406\u89e3\u3057\u96e3\u3044\u3093\u3060\u3051\u3069\u3001\/shop\/products\/{product}&#8217;\u3000\u3053\u308c\u3068\u30d0\u30c3\u30c6\u30a3\u30f3\u30b0\u3059\u308b\u3089\u3057\u3044\u3002<\/p>\n\n\n\n<p>php artisan route:list | grep products<\/p>\n\n\n\n<p>\u3053\u308c\u3067\u898b\u3066\u3082\u3061\u3083\u3093\u3068\u51fa\u3066\u304f\u308b\u3002<\/p>\n\n\n\n<p>????<\/p>\n\n\n\n<p>Route::get(&#8216;\/shop\/products\/{product}&#8217;, [ShopProductController::class, &#8216;show&#8217;])->name(&#8216;shop.products.show&#8217;)->whereNumber(&#8216;product&#8217;);<br><br>\u3068<\/p>\n\n\n\n<p>->whereNumber(&#8216;product&#8217;);<br><br>\u3053\u308c\u3092\u3064\u3051\u308b\u3053\u3068\u3067\u89e3\u6c7a\u3057\u305f\u3002<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e0a\u3067\u3001\/shop\/products\/create\u3000\u304c\u3069\u3046\u3057\u3066\u3082404\u306b\u306a\u308b\u3002 \u7406\u89e3\u3057\u96e3\u3044\u3093\u3060\u3051\u3069\u3001\/shop\/products\/{product}&#8217;\u3000\u3053\u308c\u3068\u30d0\u30c3\u30c6\u30a3\u30f3\u30b0\u3059\u308b\u3089\u3057\u3044\u3002 php artisan route:list | grep products \u3053\u308c\u3067\u898b\u3066\u3082\u3061\u3083\u3093\u3068\u51fa\u3066\u304f\u308b\u3002 ???? Route::get(&#8216;\/shop\/products\/{product}&#8217;, [ShopProductController::class, &#038;.. <a href=\"https:\/\/kitayama.jp\/?p=681\">\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/kitayama.jp\/index.php?rest_route=\/wp\/v2\/posts\/681"}],"collection":[{"href":"https:\/\/kitayama.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kitayama.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kitayama.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kitayama.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=681"}],"version-history":[{"count":1,"href":"https:\/\/kitayama.jp\/index.php?rest_route=\/wp\/v2\/posts\/681\/revisions"}],"predecessor-version":[{"id":682,"href":"https:\/\/kitayama.jp\/index.php?rest_route=\/wp\/v2\/posts\/681\/revisions\/682"}],"wp:attachment":[{"href":"https:\/\/kitayama.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=681"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kitayama.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=681"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kitayama.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=681"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}