{"id":9707,"date":"2022-01-10T07:00:13","date_gmt":"2022-01-09T22:00:13","guid":{"rendered":"https:\/\/blog.capilano-fw.com\/?p=9707"},"modified":"2021-12-15T01:45:36","modified_gmt":"2021-12-14T16:45:36","slug":"%e3%80%90laravel%e3%80%91%e5%85%a5%e5%8a%9b%e5%80%8b%e6%95%b0%e3%82%92%e5%a4%89%e6%9b%b4%e3%81%a7%e3%81%8d%e3%82%8b%e3%83%95%e3%82%a9%e3%83%bc%e3%83%a0%e3%81%a7%e3%83%ac%e3%82%b7%e3%83%94%e6%8a%95","status":"publish","type":"post","link":"https:\/\/blog.capilano-fw.com\/?p=9707","title":{"rendered":"\u3010Laravel\u3011\u5165\u529b\u500b\u6570\u3092\u5909\u66f4\u3067\u304d\u308b\u30d5\u30a9\u30fc\u30e0\u3067\u30ec\u30b7\u30d4\u6295\u7a3f\u6a5f\u80fd\u3092\u3064\u304f\u308b"},"content":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u79c1\u306b\u3068\u3063\u3066\u4eba\u751f\u3092\u597d\u8ee2\u3055\u305b\u3066\u304f\u308c\u305f\u30ab\u30ca\u30c0\u7559\u5b66\u304b\u3089\u5c11\u3057\u6642\u9593\u304c\u7d4c\u3061\u3001\u300c<strong>\u3082\u3046\u4e00\u56de\u884c\u304d\u305f\u3044\u306a\u2026<\/strong>\u300d\u3068\u611f\u3058\u308b\u4eca\u65e5\u3053\u306e\u9803\u3067\u3059\u3002<\/p>\n<p>\u305d\u3057\u3066\u3001\u6614\u64ae\u3063\u305f\u5199\u771f\u3092\u898b\u3066\u3044\u308b\u3068\u3001\u307b\u307c\u6bce\u65e5\u300c\u30af\u30c3\u30af\u30d1\u30c3\u30c9\u300d\u3092\u898b\u306a\u304c\u3089\u81ea\u5206\u3067\u6599\u7406\u3092\u3057\u3066\u3044\u305f\u3053\u3068\u3092\u601d\u3044\u51fa\u3057\u3001\u3042\u308b\u6a5f\u80fd\u3092\u3064\u304f\u3063\u3066\u307f\u305f\u304f\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u305d\u308c\u304c\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb<\/p>\n<p><strong style=\"font-size: 35px;\">\u500b\u6570\u3092\u81ea\u7531\u306b\u5909\u66f4\u3067\u304d\u308b\u5165\u529b\u30d5\u30a9\u30fc\u30e0<\/strong><\/p>\n<p>\u3067\u3059\u3002<\/p>\n<p>\u3064\u307e\u308a\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b<strong>\u81ea\u5206\u304c\u6b32\u3057\u3044\u5206\u3060\u3051\u5165\u529b\u30dc\u30c3\u30af\u30b9\u3092\u7528\u610f\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b<\/strong>\u30d5\u30a9\u30fc\u30e0\u3067\u3059\u306d\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9708\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/10\/laravel_recipe_1.png\" alt=\"\" width=\"412\" height=\"213\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/10\/laravel_recipe_1.png 412w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/10\/laravel_recipe_1-300x155.png 300w\" sizes=\"auto, (max-width: 412px) 100vw, 412px\" \/><\/p>\n<p>\u3068\u3044\u3046\u306e\u3082\u3001\u3053\u306e\u6a5f\u80fd\u3092\u4f7f\u3063\u3066\u300c\u98df\u6750\u3092\u8907\u6570\u767b\u9332\u3067\u304d\u308b\u30ec\u30b7\u30d4\u6295\u7a3f\u6a5f\u80fd\u300d\u3092\u3064\u304f\u308a\u305f\u304f\u306a\u3063\u305f\u304b\u3089\u306a\u3093\u3067\u3059\u306d\u3002<\/p>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u4eca\u56de\u306f\u3053\u306e\u300c<strong>\u5165\u529b\u500b\u6570\u3092\u5909\u66f4\u3067\u304d\u308b\u30d5\u30a9\u30fc\u30e0<\/strong>\u300d\u3067\u30ec\u30b7\u30d4\u6295\u7a3f\u6a5f\u80fd\u3092\u4f5c\u3063\u3066\u307f\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u305c\u3072\u4f55\u304b\u306e\u53c2\u8003\u306b\u306a\u308a\u307e\u3057\u305f\u3089\u5b09\u3057\u3044\u3067\u3059\u3002\ud83d\ude04\u2728<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3566 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/04\/no_1.png\" alt=\"\" width=\"306\" height=\"320\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/04\/no_1.png 306w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/04\/no_1-287x300.png 287w\" sizes=\"auto, (max-width: 306px) 100vw, 306px\" \/>\u300c\u914d\u5217\u7528\u306e\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u3082\u7d39\u4ecb\u3057\u307e\u3059\ud83d\udc4d\u300d<\/p>\n<p><strong>\u958b\u767a\u74b0\u5883\uff1a<\/strong> Laravel 8.x\u3001Vue 3<\/p>\n<h1 id=\"about_database\">\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u69cb\u9020<\/h1>\n<p>\u4eca\u56de\u306e\u30ec\u30b7\u30d4\u6295\u7a3f\u6a5f\u80fd\u3092\u3064\u304f\u308b\u305f\u3081\u306b\u4ee5\u4e0b\uff12\u3064\u306e\u30c6\u30fc\u30d6\u30eb\u3092\u7528\u610f\u3057\u307e\u3059\u3002<\/p>\n<ul>\n<li>recipes \u30fb\u30fb\u30fb \u30ec\u30b7\u30d4\uff08\u4f8b\uff1a\u30ab\u30ec\u30fc\u3001\u8089\u3058\u3083\u304c\uff09<\/li>\n<li>ingredients \u30fb\u30fb\u30fb \u6750\u6599\uff08\u4f8b\uff1a\u3058\u3083\u304c\u3044\u3082\u3001\u306b\u3093\u3058\u3093\uff09<\/li>\n<\/ul>\n<p>\u3064\u307e\u308a\u3001\u30ab\u30ec\u30fc\u306e\u4f8b\u3067\u8a00\u3046\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><strong>\u30ab\u30ec\u30fc\uff08\u30ec\u30b7\u30d4\uff09<\/strong><br \/>\n\u2514\u3000\uff11\uff0e\u30ab\u30ec\u30fc\u30eb\u30fc\uff08\u6750\u6599\uff09<br \/>\n\u2514\u3000\uff12\uff0e\u3058\u3083\u304c\u3044\u3082\uff08\u6750\u6599\uff09<br \/>\n\u2514\u3000\uff13\uff0e\u306b\u3093\u3058\u3093\uff08\u6750\u6599\uff09<br \/>\n\u2514\u3000\u306a\u3069\u306a\u3069<\/p>\n<p>\u305d\u3046\u3067\u3059\u3002<\/p>\n<p>\u3053\u308c\u306f\u300c<strong>recipes\uff1aingredients<\/strong>\u300d\u304c\u300c<strong>\uff11\uff1a\u591a<\/strong>\u300d\u306e\u30ea\u30ec\u30fc\u30b7\u30e7\u30f3\u30b7\u30c3\u30d7\u306b\u306a\u3063\u3066\u3044\u308b\u3068\u3044\u3046\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u306d\u3002<\/p>\n<p>\u3067\u306f\u3001\u3053\u308c\u3092\u8e0f\u307e\u3048\u3066\u5b9f\u969b\u306e\u4f5c\u696d\u3092\u3057\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u2757<\/p>\n<h1>\u5fc5\u8981\u306a\u30d5\u30a1\u30a4\u30eb\u3092\u7528\u610f\u3059\u308b<\/h1>\n<p>\u3067\u306f\u3001\u4eca\u56de\u306e\u6a5f\u80fd\u306b\u5fc5\u8981\u306a\u30d5\u30a1\u30a4\u30eb\u3064\u304f\u3063\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<p>\u307e\u305a\u306f\u30ec\u30b7\u30d4\u7528\u3067\u3059\u3002<br \/>\n\u30ec\u30b7\u30d4\u306b\u306f\u4ee5\u4e0b\uff13\u3064\u304c\u5fc5\u8981\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<ul>\n<li>\u30e2\u30c7\u30eb<\/li>\n<li>\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3<\/li>\n<li>\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc<\/li>\n<\/ul>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><strong>php artisan make:model Recipe -mc<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u3001\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c\u308b\u306e\u3067\u3059\u304c\u3001\u4e2d\u8eab\u306e\u5909\u66f4\u306e\u524d\u306b\u6750\u6599\u7528\u306e\u30b3\u30de\u30f3\u30c9\u3082\u5b9f\u884c\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u6750\u6599\u7528\u306b\u5fc5\u8981\u306a\u306e\u306f\u3001\u4ee5\u4e0b\uff12\u3064\u3067\u3059\u3002<\/p>\n<ul>\n<li>\u30e2\u30c7\u30eb<\/li>\n<li>\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3<\/li>\n<\/ul>\n<p>\u30b3\u30de\u30f3\u30c9\u306f\u4ee5\u4e0b\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre><strong>php artisan make:model Ingredient -m<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u3001\u3053\u3061\u3089\u3082\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c\u5408\u8a08\u3067\uff15\u3064\u306e\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c\u305f\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u3067\u306f\u3001\u3072\u3068\u3064\u305a\u3064\u4e2d\u8eab\u3092\u5909\u66f4\u3057\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<h1>\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u306e\u8a2d\u5b9a<\/h1>\n<p>\u307e\u305a\u306f\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u3067\u3059\u3002<\/p>\n<p><strong>database\/migrations\/****_**_**_******_create_recipes_table.php<\/strong><\/p>\n<pre>\/\/ \u7701\u7565\r\n\r\npublic function up()\r\n{\r\n    <strong>Schema::create('recipes', function (Blueprint $table) {<\/strong>\r\n<strong>        $table-&gt;id();<\/strong>\r\n<strong>        $table-&gt;string('name')-&gt;comment('\u6599\u7406\u540d');<\/strong>\r\n<strong>        $table-&gt;timestamps();<\/strong>\r\n<strong>    });<\/strong>\r\n}<\/pre>\n<p><strong>database\/migrations\/****_**_**_******_create_ingredients_table.php<\/strong><\/p>\n<pre>\/\/ \u7701\u7565\r\n\r\npublic function up()\r\n{\r\n    <strong>Schema::create('ingredients', function (Blueprint $table) {<\/strong>\r\n<strong>        $table-&gt;id();<\/strong>\r\n<strong>        $table-&gt;unsignedBigInteger('recipe_id')-&gt;comment('\u30ec\u30b7\u30d4ID');<\/strong>\r\n<strong>        $table-&gt;string('name')-&gt;comment('\u6750\u6599\u540d');<\/strong>\r\n<strong>        $table-&gt;timestamps();<\/strong>\r\n\r\n<strong>        $table-&gt;foreign('recipe_id')-&gt;references('id')-&gt;on('recipes');<\/strong>\r\n<strong>    });<\/strong>\r\n}<\/pre>\n<p>\u3061\u306a\u307f\u306b\u3001\u3053\u306e\u4e2d\u3067\u306f<code>recipe_id<\/code>\u306b\u5916\u90e8\u30ad\u30fc\u3092\u30bb\u30c3\u30c8\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3067\u306f\u3001\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u306e\u8a2d\u5b9a\u304c\u5b8c\u4e86\u3057\u305f\u3089\u3001\u5b9f\u969b\u306b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3078\u53cd\u6620\u3055\u305b\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><strong>php artisan migrate<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u5b9f\u969b\u306e\u30c6\u30fc\u30d6\u30eb\u306f\u3053\u3046\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9709\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/10\/laravel_recipe_2.png\" alt=\"\" width=\"325\" height=\"239\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/10\/laravel_recipe_2.png 325w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/10\/laravel_recipe_2-300x221.png 300w\" sizes=\"auto, (max-width: 325px) 100vw, 325px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9710\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/10\/laravel_recipe_3.png\" alt=\"\" width=\"328\" height=\"257\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/10\/laravel_recipe_3.png 328w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/10\/laravel_recipe_3-300x235.png 300w\" sizes=\"auto, (max-width: 328px) 100vw, 328px\" \/><\/p>\n<h1>\u30e2\u30c7\u30eb\u306e\u8a2d\u5b9a<\/h1>\n<p>\u6b21\u306b\u30e2\u30c7\u30eb\u3067\u3059\u304c\u3001\u4eca\u56de\u8a2d\u5b9a\u304c\u5fc5\u8981\u306a\u306e\u306f<code>Recipe.php<\/code>\u3060\u3051\u3067\u3059\u3002<\/p>\n<pre>\/\/ \u7701\u7565\r\n\r\nclass Recipe extends Model\r\n{\r\n    use HasFactory;\r\n\r\n    <strong>\/\/ Relationship<\/strong>\r\n<strong>    public function ingredients()<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        return $this-&gt;hasMany(Ingredient::class, 'recipe_id', 'id');<\/strong>\r\n<strong>    }<\/strong>\r\n}<\/pre>\n<p>\u300c<a href=\"#about_database\">\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u69cb\u9020<\/a>\u300d\u3067\u3082\u7d39\u4ecb\u3057\u305f\u3068\u304a\u308a\u300c<strong>1\uff1a\u591a<\/strong>\u300d\u306e\u95a2\u4fc2\u306b\u306a\u308b\u306e\u3067\u3001<strong>hasMany()<\/strong>\u3092\u4f7f\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<h1>\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u306e\u8a2d\u5b9a<\/h1>\n<p>\u7d9a\u3044\u3066\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3067\u3059\u3002<\/p>\n<p><strong>app\/Http\/Controllers\/RecipeController.php<\/strong><\/p>\n<pre>&lt;?php\r\n\r\nnamespace App\\Http\\Controllers;\r\n\r\n<strong>use App\\Models\\Ingredient;<\/strong>\r\n<strong>use App\\Models\\Recipe;<\/strong>\r\nuse Illuminate\\Http\\Request;\r\nuse Illuminate\\Support\\Facades\\DB;\r\n\r\nclass RecipeController extends Controller\r\n{\r\n    <strong>public function show(Recipe $recipe)<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        \/\/ TODO: \u3053\u3053\u306b\u8868\u793a\u7528\u30ed\u30b8\u30c3\u30af\u3092\u3064\u304f\u308b\uff08\u4eca\u306f\u30c6\u30b9\u30c8\uff09<\/strong>\r\n\r\n<strong>        $recipe-&gt;load('ingredients');<\/strong>\r\n<strong>        dd($recipe-&gt;toArray());<\/strong>\r\n<strong>    }<\/strong>\r\n\r\n<strong>    public function create()<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        return view('recipe.create');<\/strong>\r\n<strong>    }<\/strong>\r\n\r\n<strong>    public function store(Request $request)<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        $request-&gt;validate([<\/strong>\r\n<strong>            'name' =&gt; ['required', 'string', 'max:255'],<\/strong>\r\n<strong>            'ingredients' =&gt; ['required'],<\/strong>\r\n<strong>            'ingredients.*' =&gt; ['required', 'distinct'],<\/strong>\r\n<strong>        ]);<\/strong>\r\n\r\n<strong>        $result = false;<\/strong>\r\n\r\n<strong>        DB::beginTransaction();<\/strong>\r\n\r\n<strong>        try {<\/strong>\r\n\r\n<strong>            $recipe = new Recipe();<\/strong>\r\n<strong>            $recipe-&gt;name = $request-&gt;name;<\/strong>\r\n<strong>            $recipe-&gt;save();<\/strong>\r\n\r\n<strong>            foreach ($request-&gt;ingredients as $ingredient_name) {<\/strong>\r\n\r\n<strong>                $ingredient = new Ingredient();<\/strong>\r\n<strong>                $ingredient-&gt;recipe_id = $recipe-&gt;id;<\/strong>\r\n<strong>                $ingredient-&gt;name = $ingredient_name;<\/strong>\r\n<strong>                $ingredient-&gt;save();<\/strong>\r\n\r\n<strong>            }<\/strong>\r\n\r\n<strong>            DB::commit();<\/strong>\r\n<strong>            $result = true;<\/strong>\r\n\r\n<strong>        } catch (\\Exception $e) {<\/strong>\r\n\r\n<strong>            DB::rollBack();<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n\r\n<strong>        return ['result' =&gt; $result];<\/strong>\r\n<strong>    }<\/strong>\r\n}<\/pre>\n<p>\u3053\u306e\u4e2d\u3067\u91cd\u8981\u306a\u306e\u304c\u3001\u4ee5\u4e0b\u306e\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u90e8\u5206\u3067\u3059\u3002<\/p>\n<ul>\n<li>&#8216;ingredients&#8217; =&gt; [&#8216;required&#8217;]<\/li>\n<li>&#8216;ingredients.*&#8217; =&gt; [&#8216;required&#8217;, &#8216;distinct&#8217;]<\/li>\n<\/ul>\n<p>\u307e\u305a\uff11\u3064\u76ee\u306f\u3001<\/p>\n<p><strong>\u914d\u5217\u304c\u30bc\u30ed\u500b\u306a\u3089\u30a2\u30a6\u30c8\u2757<\/strong><\/p>\n<p>\u3068\u3044\u3046\u610f\u5473\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n\u3064\u307e\u308a\u3001\u914d\u5217\u306e\u4ef6\u6570\u3092\u30c1\u30a7\u30c3\u30af\u3057\u3066\u3044\u308b\u308f\u3051\u3067\u3059\u306d\u3002<\/p>\n<p>\u305d\u3057\u3066\u3001\uff12\u3064\u76ee\u306f\u3001<\/p>\n<ul>\n<li><strong>\u914d\u5217\u306e\u5404\u30c7\u30fc\u30bf\uff08\u4eca\u56de\u306f\u6750\u6599\u540d\uff09\u304c\u7a7a\u767d\u306a\u3089\u30a2\u30a6\u30c8\u2757<\/strong><\/li>\n<li><strong>\u3055\u3089\u306b\u3001\u4e2d\u8eab\u304c\u4ed6\u3068\u91cd\u8907\u3057\u3066\u3082\u30a2\u30a6\u30c8\u2757\u2757<\/strong><\/li>\n<\/ul>\n<p>\u3068\u3044\u3046\u610f\u5473\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u3064\u307e\u308a\u3001\u540c\u3058<code>required<\/code>\u3067\u3059\u304c\u3001\u5c11\u3057\u610f\u5473\u5408\u3044\u304c\u9055\u3063\u3066\u3044\u307e\u3059\u306e\u3067\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u306a\u304a\u3001<code>*<\/code>\u306f\u30ef\u30a4\u30eb\u30c9\u30ab\u30fc\u30c9\u3068\u3044\u3063\u3066\u300c<strong>\u30c8\u30e9\u30f3\u30d7\u306e\u30b8\u30e7\u30fc\u30ab\u30fc\u306e\u3088\u3046\u306b\u4f55\u306b\u3067\u3082\u306a\u308c\u308b<\/strong>\u300d\u306e\u3067\u3001\u3064\u307e\u308a\u306f\u914d\u5217\u306e\u5168\u30c7\u30fc\u30bf\u304c\u5bfe\u8c61\u3068\u3044\u3046\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><strong>\u4f8b\uff1a<\/strong> ingredients[<strong>0<\/strong>], ingredients[<strong>1<\/strong>], ingredients[<strong>2<\/strong>], ingredients[<strong>3<\/strong>], &#8230;.. \u5168\u3066\u306e\u30c7\u30fc\u30bf\u304c\u5bfe\u8c61<\/p>\n<p>\u305d\u3057\u3066\u3001\u4ee5\u4e0b\u30b3\u30fc\u30c9\u306e\u300c<strong>\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3<\/strong>\u300d\u3092\u4f7f\u3063\u3066\u3044\u308b\u90e8\u5206\u3082\u91cd\u8981\u3067\u3059\u3002<\/p>\n<ul>\n<li>DB::beginTransaction()<\/li>\n<li>DB::commit()<\/li>\n<li>DB::rollBack()<\/li>\n<\/ul>\n<p>\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u3068\u306f\u3001\u30b7\u30f3\u30d7\u30eb\u306b\u8a00\u3046\u3068\u300c<strong>\u5168\u90e8\u5b8c\u4e86\u3067\u304d\u305f\u3089\u5b9f\u969b\u306b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u66f8\u304d\u63db\u3048\u3092\u3059\u308b\u3088<\/strong>\u300d\u3068\u3044\u3046\u3082\u306e\u3067\u3059\u3002<\/p>\n<p>\u3064\u307e\u308a\u3001\u4ee5\u4e0b\uff12\u3064\u306e\u90e8\u5206\u3067\u306f\u30c7\u30fc\u30bf\u4fdd\u5b58\u3057\u3066\u3044\u308b\u3068\u601d\u3044\u304d\u3084\u3001\u3053\u308c\u306f\u307e\u3060\u300c<strong>\u4e00\u6642\u7684\u306a\u4fdd\u5b58<\/strong>\u300d\u306e\u72b6\u614b\u3067\u3059\u3002<\/p>\n<ul>\n<li>$recipe-&gt;save();<\/li>\n<li>$ingredient-&gt;save();<\/li>\n<\/ul>\n<p>\u3067\u306f\u3001\u3053\u306e\u300c<strong>\u4e00\u6642\u7684\u306a\u4fdd\u5b58<\/strong>\u300d\u3092\u300c<strong>\u672c\u756a\u306e\u4fdd\u5b58<\/strong>\u300d\u306b\u3059\u308b\u306b\u306f\u3069\u3046\u3059\u308c\u3070\u3044\u3044\u304b\u3068\u3044\u3046\u3068\u3001\u305d\u308c\u304c<code>DB::commit()<\/code>\u306b\u306a\u308a\u307e\u3059\u3002\uff08\u7d50\u679c\u306b\u30b3\u30df\u30c3\u30c8\uff01\u3067\u3059\u306d\ud83d\ude04\uff09<\/p>\n<p>\u9006\u306b\u3001\u300c<strong>\u4e00\u6642\u7684\u306a\u4fdd\u5b58<\/strong>\u300d\u3092\u5168\u3066\u306a\u304b\u3063\u305f\u3053\u3068\u306b\u3059\u308b\u306b\u306f<code>DB::rollBack()<\/code>\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<p>\u3067\u306f\u3001\u306a\u305c\u3053\u3093\u306a\u3081\u3093\u3069\u3046\u306a\u3053\u3068\u3092\u3059\u308b\u304b\u3068\u3044\u3046\u3068\u3001\u300c<strong>\u9014\u4e2d\u307e\u3067\u4fdd\u5b58\u3067\u304d\u3066\u305f\u306e\u306b\u3001\u305d\u308c\u4ee5\u964d\u306f\u30e0\u30ea\u3060\u3063\u305f\u3002\u30b4\u30e1\u30f3\uff01<\/strong>\u300d\u3088\u308a\u300c<strong>\u9014\u4e2d\u5931\u6557\u3057\u305f\u304b\u3089\u3001\u5168\u90e8\u306a\u304b\u3063\u305f\u3053\u3068\u306b\u3057\u3068\u304d\u307e\u3059\uff08\u30ad\u30ea\u30c3\uff09<\/strong>\u300d\u306e\u65b9\u304c<strong>DB\u306b\u5909\u306a\u30c7\u30fc\u30bf\u304c\u5165\u3063\u3066\u3053\u306a\u3044\u304b\u3089<\/strong>\u3067\u3059\u3002<\/p>\n<h1>\u30d3\u30e5\u30fc\u3092\u3064\u304f\u308b<\/h1>\n<p>\u6b21\u306b\u3001\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3067\u30bb\u30c3\u30c8\u3057\u305f\u30d3\u30e5\u30fc\uff08HTML\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\uff09\u3092\u3064\u304f\u308a\u307e\u3059\u3002<\/p>\n<p><strong>resources\/views\/recipe\/create.blade.php<\/strong><\/p>\n<pre><strong>&lt;html&gt;<\/strong>\r\n<strong>&lt;head&gt;<\/strong>\r\n<strong>    &lt;link href=\"https:\/\/cdn.jsdelivr.net\/npm\/bootstrap@5.0.1\/dist\/css\/bootstrap.min.css\" rel=\"stylesheet\"&gt;<\/strong>\r\n<strong>&lt;\/head&gt;<\/strong>\r\n<strong>&lt;body&gt;<\/strong>\r\n<strong>&lt;div id=\"app\" class=\"p-4\"&gt;<\/strong>\r\n<strong>    &lt;h1 class=\"mb-4\"&gt;\u30ec\u30b7\u30d4\u6295\u7a3f\u6a5f\u80fd\u306e\u30b5\u30f3\u30d7\u30eb&lt;\/h1&gt;<\/strong>\r\n<strong>    &lt;div class=\"row\"&gt;<\/strong>\r\n<strong>        &lt;div class=\"col-4\"&gt;<\/strong>\r\n<strong>            &lt;div class=\"mb-4\"&gt;<\/strong>\r\n<strong>                &lt;label&gt;\u6599\u7406\u540d&lt;\/label&gt;<\/strong>\r\n<strong>                &lt;input type=\"text\" class=\"form-control\" v-model=\"params.name\"&gt;<\/strong>\r\n<strong>            &lt;\/div&gt;<\/strong>\r\n<strong>            &lt;div class=\"mb-3\"&gt;<\/strong>\r\n<strong>                &lt;div class=\"float-end\"&gt;<\/strong>\r\n<strong>                    &lt;button type=\"button\" class=\"btn btn-outline-primary btn-sm\" @click=\"addIngredient\"&gt;\uff0b&lt;\/button&gt;<\/strong>\r\n<strong>                &lt;\/div&gt;<\/strong>\r\n<strong>                &lt;label&gt;\u98df\u6750&lt;small&gt;\uff08&lt;span v-text=\"params.ingredients.length\"&gt;&lt;\/span&gt;\u4ef6\uff09&lt;\/small&gt;&lt;\/label&gt;<\/strong>\r\n<strong>            &lt;\/div&gt;<\/strong>\r\n<strong>            &lt;div class=\"mb-4\"&gt;<\/strong>\r\n<strong>                &lt;div class=\"position-relative mb-3\" v-for=\"(ingredient,index) in params.ingredients\"&gt;<\/strong>\r\n<strong>                    &lt;input type=\"text\" class=\"form-control\" v-model=\"params.ingredients[index]\"&gt;<\/strong>\r\n<strong>                    &lt;div class=\"position-absolute\" style=\"right:10px;top:8px;\"&gt;<\/strong>\r\n<strong>                        &lt;small&gt;<\/strong>\r\n<strong>                            &lt;a href=\"#\" type=\"button\" @click=\"removeIngredient(index)\"&gt;\u524a\u9664&lt;\/a&gt;<\/strong>\r\n<strong>                        &lt;\/small&gt;<\/strong>\r\n<strong>                    &lt;\/div&gt;<\/strong>\r\n<strong>                &lt;\/div&gt;<\/strong>\r\n<strong>            &lt;\/div&gt;<\/strong>\r\n<strong>            &lt;div class=\"text-end pt-2\"&gt;<\/strong>\r\n<strong>                &lt;button type=\"button\" class=\"btn btn-primary btn-lg\" @click=\"onSubmit\"&gt;\u4fdd\u5b58\u3059\u308b&lt;\/button&gt;<\/strong>\r\n<strong>            &lt;\/div&gt;<\/strong>\r\n<strong>        &lt;\/div&gt;<\/strong>\r\n<strong>    &lt;\/div&gt;<\/strong>\r\n<strong>&lt;\/div&gt;<\/strong>\r\n<strong>&lt;script src=\"https:\/\/cdn.jsdelivr.net\/npm\/@popperjs\/core@2.9.2\/dist\/umd\/popper.min.js\"&gt;&lt;\/script&gt;<\/strong>\r\n<strong>&lt;script src=\"https:\/\/unpkg.com\/vue@3.1.1\/dist\/vue.global.prod.js\"&gt;&lt;\/script&gt;<\/strong>\r\n<strong>&lt;script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/axios\/0.21.1\/axios.min.js\"&gt;&lt;\/script&gt;<\/strong>\r\n<strong>&lt;script&gt;<\/strong>\r\n\r\n<strong>    Vue.createApp({<\/strong>\r\n<strong>        data() {<\/strong>\r\n<strong>            return {<\/strong>\r\n<strong>                params: {<\/strong>\r\n<strong>                    name: '',<\/strong>\r\n<strong>                    ingredients: []<\/strong>\r\n<strong>                }<\/strong>\r\n<strong>            }<\/strong>\r\n<strong>        },<\/strong>\r\n<strong>        methods: {<\/strong>\r\n<strong>            addIngredient() {<\/strong>\r\n\r\n<strong>                this.params.ingredients.push('');<\/strong>\r\n\r\n<strong>            },<\/strong>\r\n<strong>            removeIngredient(removingIndex) {<\/strong>\r\n\r\n<strong>                this.params.ingredients.splice(removingIndex, 1);<\/strong>\r\n\r\n<strong>            },<\/strong>\r\n<strong>            onSubmit() {<\/strong>\r\n\r\n<strong>                if(confirm('\u4fdd\u5b58\u3057\u307e\u3059\u3002\u3088\u308d\u3057\u3044\u3067\u3059\u304b\uff1f')) {<\/strong>\r\n\r\n<strong>                    const url = '{{ route('recipe.store') }}';<\/strong>\r\n\r\n<strong>                    axios.post(url, this.params)<\/strong>\r\n<strong>                        .then(response =&gt; {<\/strong>\r\n\r\n<strong>                            if(response.data.result === true) {<\/strong>\r\n\r\n<strong>                                alert('\u4fdd\u5b58\u304c\u5b8c\u4e86\u3057\u307e\u3057\u305f\u3002');<\/strong>\r\n\r\n<strong>                            }<\/strong>\r\n\r\n<strong>                        })<\/strong>\r\n<strong>                        .catch(error =&gt; {<\/strong>\r\n\r\n<strong>                            \/\/ TODO: \u3053\u3053\u3067\u30a8\u30e9\u30fc\u51e6\u7406\u3092\u3059\u308b<\/strong>\r\n<strong>                            console.log(error.response.data);<\/strong>\r\n<strong>                            alert('\u5165\u529b\u30a8\u30e9\u30fc\u304c\u3042\u308a\u307e\u3057\u305f');<\/strong>\r\n\r\n<strong>                        });<\/strong>\r\n\r\n<strong>                }<\/strong>\r\n\r\n<strong>            }<\/strong>\r\n<strong>        }<\/strong>\r\n<strong>    }).mount('#app');<\/strong>\r\n\r\n<strong>&lt;\/script&gt;<\/strong>\r\n<strong>&lt;\/body&gt;<\/strong>\r\n<strong>&lt;\/html&gt;<\/strong><\/pre>\n<p>\u3053\u306e\u4e2d\u3067\u306f\u3001\u5404\u30d1\u30e9\u30e1\u30fc\u30bf\u3092<code>Vue<\/code>\u3067\u30ea\u30a2\u30af\u30c6\u30a3\u30d6\u306b\u5909\u66f4\u3057\u3066\u3044\u308b\u3060\u3051\u3067\u3059\u3002<\/p>\n<p>\u306a\u304a\u3001<code>splice()<\/code>\u306f<strong>\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u756a\u53f7\u3067\u6307\u5b9a\u3059\u308b\u3053\u3068\u3067\u914d\u5217\u306e\u30c7\u30fc\u30bf\u3092\u524a\u9664<\/strong>\u3059\u308b\u95a2\u6570\u3067\u3059\u3002\u899a\u3048\u3066\u304a\u304f\u3068\u4fbf\u5229\u3067\u3059\u3088\ud83d\udc4d<\/p>\n<h1>\u30eb\u30fc\u30c8\u3092\u3064\u304f\u308b<\/h1>\n<p>\u305d\u3057\u3066\u3001\u6700\u5f8c\u306b\u30eb\u30fc\u30c8\u3067\u3059\u3002<\/p>\n<p><strong>routes\/web.php<\/strong><\/p>\n<pre><strong>use App\\Http\\Controllers\\RecipeController;<\/strong>\r\n\r\n<strong>Route::get('recipe\/create', [RecipeController::class, 'create'])-&gt;name('recipe.create');<\/strong>\r\n<strong>Route::get('recipe\/{recipe}', [RecipeController::class, 'show'])-&gt;name('recipe.show');<\/strong>\r\n<strong>Route::post('recipe', [RecipeController::class, 'store'])-&gt;name('recipe.store');<\/strong><\/pre>\n<p>\u3053\u308c\u3067\u4f5c\u696d\u306f\u5b8c\u4e86\u3067\u3059\u2757<\/p>\n<p>\u304a\u75b2\u308c\u69d8\u3067\u3057\u305f\ud83d\ude04\u2728<\/p>\n<h1>\u30c6\u30b9\u30c8\u3057\u3066\u307f\u308b<\/h1>\n<p>\u3067\u306f\u3001\u5b9f\u969b\u306b\u30c6\u30b9\u30c8\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u2757<br \/>\n\u307e\u305a\u306f\u300c<strong>http:\/\/******\/recipe\/create<\/strong>\u300d\u306b\u30d6\u30e9\u30a6\u30b6\u3067\u30a2\u30af\u30bb\u30b9\u3057\u307e\u3059\u3002<\/p>\n<p>\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30d5\u30a9\u30fc\u30e0\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9712\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/10\/laravel_recipe_4.png\" alt=\"\" width=\"510\" height=\"285\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/10\/laravel_recipe_4.png 510w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/10\/laravel_recipe_4-300x168.png 300w\" sizes=\"auto, (max-width: 510px) 100vw, 510px\" \/><\/p>\n<p>\u3067\u306f\u3001\u300c<strong>\uff0b<\/strong>\u300d\u30dc\u30bf\u30f3\u3092\uff14\u56de\u30af\u30ea\u30c3\u30af\u3057\u3066\u5165\u529b\u9805\u76ee\u3092\u5897\u3084\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u3059\u308b\u3068\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9711\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/10\/laravel_recipe_5.png\" alt=\"\" width=\"507\" height=\"498\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/10\/laravel_recipe_5.png 507w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/10\/laravel_recipe_5-300x295.png 300w\" sizes=\"auto, (max-width: 507px) 100vw, 507px\" \/><\/p>\n<p>\u98df\u6750\u306e\u5165\u529b\u9805\u76ee\u304c\u5897\u3048\u307e\u3057\u305f\u3002<br \/>\n\u3067\u306f\u3001\u305d\u308c\u305e\u308c\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5165\u529b\u3057\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9713\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/10\/laravel_recipe_6.png\" alt=\"\" width=\"509\" height=\"508\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/10\/laravel_recipe_6.png 509w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/10\/laravel_recipe_6-300x300.png 300w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/10\/laravel_recipe_6-150x150.png 150w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/10\/laravel_recipe_6-100x100.png 100w\" sizes=\"auto, (max-width: 509px) 100vw, 509px\" \/><\/p>\n<p>\u3067\u306f\u3001\u300c<strong>\u4fdd\u5b58\u3059\u308b<\/strong>\u300d\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u9001\u4fe1\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<br \/>\n\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5b8c\u4e86\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u8868\u793a\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9716\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/10\/laravel_recipe_7.png\" alt=\"\" width=\"444\" height=\"148\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/10\/laravel_recipe_7.png 444w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/10\/laravel_recipe_7-300x100.png 300w\" sizes=\"auto, (max-width: 444px) 100vw, 444px\" \/><\/p>\n<p>\u6210\u529f\u3067\u3059\u2757<\/p>\n<p>\u3067\u306f\u3001\u5148\u307b\u3069\u4f5c\u6210\u3057\u305f\u30c7\u30fc\u30bf\u304c\u30ad\u30c1\u30f3\u3068\u5165\u3063\u3066\u3044\u308b\u304b\u3082\u78ba\u8a8d\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<br \/>\n\u300c<strong>http:\/\/******\/recipe\/1<\/strong>\u300d\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u3059\u308b\u3068\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9717\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/10\/larvel_recipe_8.png\" alt=\"\" width=\"320\" height=\"618\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/10\/larvel_recipe_8.png 320w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/10\/larvel_recipe_8-155x300.png 155w\" sizes=\"auto, (max-width: 320px) 100vw, 320px\" \/><\/p>\n<p>\u306f\u3044\u2757<br \/>\n\u30ad\u30c1\u30f3\u3068\u30ea\u30ec\u30fc\u30b7\u30e7\u30f3\u30b7\u30c3\u30d7\u3057\u305f\u5f62\u3067\u30c7\u30fc\u30bf\u304c\u8868\u793a\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<p>\u5168\u3066\u6210\u529f\u3067\u3059\ud83d\ude04\u2728<\/p>\n<h1>\u4f01\u696d\u69d8\u3078\u306e\u3054\u63d0\u6848<\/h1>\n<p>\u4eca\u56de\u306e\u3088\u3046\u306a\u300c<strong>\u5165\u529b\u500b\u6570\u3092\u5909\u66f4\u3067\u304d\u308b\u30d5\u30a9\u30fc\u30e0<\/strong>\u300d\u3092\u4f7f\u3048\u3070\u3001\u81ea\u793e\u88fd\u54c1\u306e\u30b0\u30eb\u30fc\u30d7\u7ba1\u7406\u3060\u3051\u3067\u306a\u304f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u30fb\u30c1\u30fc\u30e0\u306e\u30e1\u30f3\u30d0\u30fc\u7ba1\u7406\u3001\u304a\u5ba2\u69d8\u306e\u3054\u5bb6\u65cf\u69cb\u6210\u306a\u3069\u69d8\u3005\u306a\u6a5f\u80fd\u306b\u5fdc\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u3082\u3057\u3054\u76f8\u8ac7\u306b\u306a\u308a\u305f\u3044\u3053\u3068\u304c\u3054\u3056\u3044\u307e\u3057\u305f\u3089\u3001\u3044\u3064\u3067\u3082\u304a\u6c17\u8efd\u306b\u3054\u76f8\u8ac7\u304f\u3060\u3055\u3044\u3002\u304a\u5f85\u3061\u3057\u3066\u304a\u308a\u307e\u3059\u3002m(_ _)m<\/p>\n<h1>\u304a\u308f\u308a\u306b<\/h1>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u4eca\u56de\u306f\u81ea\u7531\u306b\u500b\u6570\u3092\u5909\u66f4\u3067\u304d\u308b\u5165\u529b\u30d5\u30a9\u30fc\u30e0\u3092\u4f7f\u3063\u3066\u30ec\u30b7\u30d4\u6295\u7a3f\u6a5f\u80fd\u3092\u3064\u304f\u3063\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p>\u3061\u306a\u307f\u306b\u4eca\u56de\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u3067\u300c<strong>distinct\uff08\u91cd\u8907\u7981\u6b62\uff09<\/strong>\u300d\u304c\u3042\u308b\u306e\u3092\u601d\u3044\u51fa\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u904e\u53bb\u306b\u52c9\u5f37\u3057\u3066\u3082\u3001\u5b9f\u969b\u306b\u4f7f\u3063\u3066\u3044\u306a\u3044\u3068\u3069\u3046\u3057\u3066\u3082\u5fd8\u308c\u3066\u3057\u307e\u3044\u307e\u3059\u304c\u3001\u300c<strong>\u3069\u3053\u3092\u898b\u308c\u3070\u3044\u3044\u304b<\/strong>\u300d\u3060\u3051\u899a\u3048\u3066\u304a\u3051\u3070\u306a\u3093\u3068\u304b\u306a\u308b\u3082\u3093\u3067\u3059\u306d\u3002<\/p>\n<p>\u203b \u306a\u304a\u3001\u79c1\u304c\u3088\u304f\u898b\u308b\u306e\u306f\u3084\u306f\u308a\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3067\u3059\u3002<\/p>\n<p>\u6700\u8fd1\u306f<code>Laravel<\/code>\u306e\u300c<strong>\u3053\u3093\u306a\u6a5f\u80fd\u304c\u3042\u308b\u3088<\/strong>\u300d\u3068\u3044\u3046\u3088\u3046\u306a\u8a18\u4e8b\u306f\u66f8\u3044\u3066\u306a\u3044\u3053\u3068\u3082\u3042\u3063\u3066\u3001\u305d\u306e\u5f8c\u305f\u3063\u304f\u3055\u3093\u65b0\u6a5f\u80fd\u304c\u8ffd\u52a0\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u306b\u6c17\u3065\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>\u307e\u305f\u6642\u9593\u3092\u898b\u3064\u3051\u3066\u300c<strong>\u3048\u3063\u3001\u3081\u3061\u3083\u304f\u3061\u3083\u697d\u306b\u306a\u3063\u3066\u308b\u3058\u3083\u3093\u2757<\/strong>\u300d\u3092\u9023\u767a\u3057\u305f\u3044\u3082\u306e\u3067\u3059\uff08\u7b11\uff09<\/p>\n<p>\u7686\u3055\u3093\u3082\u305c\u3072\u3084\u3063\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u306d\u3002<\/p>\n<p>\u3067\u306f\u3067\u306f\u301c\u2757<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9470 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/08\/no_13.png\" alt=\"\" width=\"294\" height=\"320\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/08\/no_13.png 294w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/08\/no_13-276x300.png 276w\" sizes=\"auto, (max-width: 294px) 100vw, 294px\" \/>\u300c\u30c9\u5eb6\u6c11\u306a\u306e\u3067\u3001\u30ec\u30c8\u30eb\u30c8\u304c\u30ab\u30ec\u30fc\u306e\u6700\u9ad8\u5cf0\u3067\u3059\u300d<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u79c1\u306b\u3068\u3063\u3066\u4eba\u751f\u3092\u597d\u8ee2\u3055\u305b\u3066\u304f\u308c\u305f\u30ab\u30ca\u30c0\u7559\u5b66\u304b\u3089\u5c11\u3057\u6642\u9593\u304c\u7d4c\u3061\u3001\u300c\u3082\u3046\u4e00\u56de\u884c\u304d\u305f\u3044\u306a\u2026\u300d\u3068\u611f\u3058\u308b\u4eca\u65e5\u3053\u306e\u9803\u3067\u3059\u3002 \u305d\u3057\u3066\u3001\u6614\u64ae\u3063\u305f\u5199\u771f\u3092\u898b\u3066\u3044\u308b\u3068\u3001\u307b\u307c &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.capilano-fw.com\/?p=9707\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;\u3010Laravel\u3011\u5165\u529b\u500b\u6570\u3092\u5909\u66f4\u3067\u304d\u308b\u30d5\u30a9\u30fc\u30e0\u3067\u30ec\u30b7\u30d4\u6295\u7a3f\u6a5f\u80fd\u3092\u3064\u304f\u308b&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":9721,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-9707","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-laravel"],"_links":{"self":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/9707","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9707"}],"version-history":[{"count":5,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/9707\/revisions"}],"predecessor-version":[{"id":9723,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/9707\/revisions\/9723"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/media\/9721"}],"wp:attachment":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9707"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9707"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9707"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}