{"id":9633,"date":"2021-10-18T07:00:02","date_gmt":"2021-10-17T22:00:02","guid":{"rendered":"https:\/\/blog.capilano-fw.com\/?p=9633"},"modified":"2021-09-09T04:16:26","modified_gmt":"2021-09-08T19:16:26","slug":"laravel-%e3%81%a7%e3%83%84%e3%82%a4%e3%83%83%e3%82%bf%e3%83%bc%e3%81%bf%e3%81%9f%e3%81%84%e3%81%aa%e3%82%a2%e3%83%b3%e3%82%b1%e3%83%bc%e3%83%88%e6%a9%9f%e8%83%bd%e3%82%92%e3%81%a4%e3%81%8f%e3%82%8b","status":"publish","type":"post","link":"https:\/\/blog.capilano-fw.com\/?p=9633","title":{"rendered":"Laravel \u3067\u30c4\u30a4\u30c3\u30bf\u30fc\u307f\u305f\u3044\u306a\u30a2\u30f3\u30b1\u30fc\u30c8\u6a5f\u80fd\u3092\u3064\u304f\u308b"},"content":{"rendered":"<p><strong style=\"font-size: 35px;\">\u3010\u7686\u3055\u3093\u3078\u306e\u304a\u793c\u3011<\/strong><\/p>\n<p>\u4eca\u56de\u3067\u306a\u3093\u3068<strong>400\u8a18\u4e8b<\/strong>\u306b\u306a\u308a\u307e\u3059\u2757<br \/>\n\u307b\u307c\u4f55\u3082\u7d9a\u304b\u306a\u3044\u79c1\u3067\u3059\u304c\u3001\u307f\u306a\u3055\u3093\u304c\u8a18\u4e8b\u3092\u8aad\u307f\u306b\u6765\u3066\u3044\u305f\u3060\u3051\u308b\u304a\u304b\u3052\u3067\u3053\u3053\u307e\u3067\u7d9a\u3051\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>\u4eca\u5f8c\u3082\u305c\u3072\u304a\u6c17\u8efd\u306b\u3054\u8a2a\u554f\u304f\u3060\u3055\u3044\ud83d\ude0a\ud83d\udc4d\u2728<\/p>\n<p>\u3055\u3066\u3055\u3066\u3001\u305d\u308c\u307b\u3069\u983b\u7e41\u3067\u306f\u306a\u3044\u306e\u3067\u3059\u304c\u79c1\u306f<code>Twitter<\/code>\u3092\u4f7f\u3063\u3066\u3044\u3066\u3001\u30d6\u30ed\u30b0\u306e\u8a18\u4e8b\u304c\u516c\u958b\u3055\u308c\u308b\u3068\u81ea\u52d5\u30c4\u30a4\u30fc\u30c8\u3055\u308c\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u3093\u306a\u30c4\u30a4\u30c3\u30bf\u30fc\u3067\u3059\u304c\u3001\u305f\u307e\u306b\u6d41\u308c\u3066\u304f\u308b\u30c4\u30a4\u30fc\u30c8\u3067\u300c<strong>\u3048\u3063\u3001\u3053\u3093\u306a\u306e\u3042\u308b\u3093\u3060\ud83d\ude33<\/strong>\u300d\u3068\u601d\u3046\u3082\u306e\u304c\u3042\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;\">\u30a2\u30f3\u30b1\u30fc\u30c8\u6a5f\u80fd<\/strong><\/p>\n<p>\u3067\u3059\u3002<\/p>\n<p><code>Twitter<\/code>\u3092\u65e5\u9803\u304b\u3089\u4f7f\u3063\u3066\u3044\u308b\u65b9\u306a\u3089\u3088\u304f\u3054\u5b58\u77e5\u3060\u3068\u601d\u3044\u307e\u3059\u304c\u3001\u6d41\u308c\u3068\u3057\u3066\u306f\u6b21\u306e\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<ol>\n<li>\u9078\u629e\u80a2\u304c\u3044\u304f\u3064\u304b\u8868\u793a\u3055\u308c\u308b<\/li>\n<li>\u9078\u629e\u80a2\u3092\u9078\u3076<\/li>\n<li>\u30a2\u30f3\u30b1\u30fc\u30c8\u7d50\u679c\u304c\u8868\u793a\u3055\u308c\u308b<\/li>\n<\/ol>\n<p>\u305d\u3053\u3067\u2757<\/p>\n<p>\u4eca\u56de\u306f<code>Laravel<\/code>\u3092\u4f7f\u3063\u3066\u3001\u3053\u306e\u30a2\u30f3\u30b1\u30fc\u30c8\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\ude0a\u2728<\/p>\n<p>\u203b \u306a\u304a\u3001\u4eca\u56de\u306f\u300c<strong>400\u8a18\u4e8b\u8a18\u5ff5<\/strong>\u300d\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u6bd4\u8f03\u7684<code>Laravel<\/code>\u3084<code>Vue<\/code>\u306b\u6163\u308c\u305f\u4eba\u306b\u5411\u3051\u3066\u306b\u30b3\u30fc\u30c9\u3092\u66f8\u3044\u3066\u3044\u307e\u3059\u3002\u3054\u671f\u5f85\u4e0b\u3055\u3044\u3002<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-6068 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/03\/no_12.png\" alt=\"\" width=\"226\" height=\"320\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/03\/no_12.png 226w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/03\/no_12-212x300.png 212w\" sizes=\"auto, (max-width: 226px) 100vw, 226px\" \/>\u300cTwitter \u306f\u60c5\u5831\u53ce\u96c6\u306b\u5f79\u7acb\u3061\u307e\u3059\u306d\ud83d\udc4d\u300d<\/p>\n<p><strong>\u958b\u767a\u74b0\u5883\uff1a<\/strong> Laravel 8.x<\/p>\n<h1>\u524d\u63d0\u3068\u3057\u3066<\/h1>\n<p>\u306a\u304a\u3001\u4eca\u56de\u306e\u30a2\u30f3\u30b1\u30fc\u30c8\u306f\u91cd\u8907\u56de\u7b54\u3092\u9632\u6b62\u3059\u308b\u305f\u3081\u306b\u300c<strong>\u30ed\u30b0\u30a4\u30f3\u5fc5\u9808<\/strong>\u300d\u306b\u3057\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001\u30ed\u30b0\u30a4\u30f3\u6a5f\u80fd\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u304c\u524d\u63d0\u3067\u3059\u3002<\/p>\n<p>\u3082\u3057\u307e\u3060\u306e\u65b9\u306f\u4ee5\u4e0b\u3092\u53c2\u8003\u306b\u3057\u3066\u30ed\u30b0\u30a4\u30f3\u6a5f\u80fd\u3092\u5148\u306b\u6e96\u5099\u3057\u3066\u304a\u3044\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><strong>\ud83d\udcdd \u53c2\u8003\u8a18\u4e8b\uff1a<\/strong>\u00a0<a href=\"https:\/\/blog.capilano-fw.com\/?p=8301\">Laravel Breeze\u3067\u300c\u30b7\u30f3\u30d7\u30eb\u306a\u300d\u30ed\u30b0\u30a4\u30f3\u6a5f\u80fd\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/a><\/p>\n<h1>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u307e\u308f\u308a\u3092\u3064\u304f\u308b<\/h1>\n<p>\u3067\u306f\u3001\u307e\u305a<b>\u300c<strong>\u30e2\u30c7\u30eb<\/strong>\u300d<\/b>\u3068<b>\u300c<strong>\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3<\/strong>\u300d<\/b>\u3067\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u307e\u308f\u308a\u3092\u3064\u304f\u3063\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u5fc5\u8981\u306a\u30c6\u30fc\u30d6\u30eb\u306f\u4ee5\u4e0b\uff13\u3064\u3067\u3059\u3002<\/p>\n<ul>\n<li>\u8cea\u554f\u30c6\u30fc\u30d6\u30eb<\/li>\n<li>\u8cea\u554f\u306e\u9078\u629e\u80a2\u30c6\u30fc\u30d6\u30eb<\/li>\n<li>\u56de\u7b54\u30c6\u30fc\u30d6\u30eb<\/li>\n<\/ul>\n<p>\u3067\u306f\u3001\u4ee5\u4e0b\u306e\uff13\u3064\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><strong>php artisan make:model Question -m<\/strong><\/pre>\n<pre><strong>php artisan make:model QuestionItem -m<\/strong><\/pre>\n<pre><strong>php artisan make:model Answer -m<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u3001\u30e2\u30c7\u30eb\u3068\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u306e\u30da\u30a2\u304c\uff13\u3064\uff08\u51686\u30d5\u30a1\u30a4\u30eb\uff09\u4f5c\u6210\u3055\u308c\u308b\u306e\u3067\u3001\u4e2d\u8eab\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n<p>\u307e\u305a\u306f\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u3067\u3059\u3002<\/p>\n<p><strong>database\/migrations\/****_**_**_******_create_questions_table.php<\/strong><\/p>\n<pre>public function up()\r\n{\r\n    <strong>Schema::create('questions', function (Blueprint $table) {<\/strong>\r\n<strong>        $table-&gt;id();<\/strong>\r\n<strong>        $table-&gt;string('title')-&gt;comment('\u30bf\u30a4\u30c8\u30eb');<\/strong>\r\n<strong>        $table-&gt;dateTime('expired_at')-&gt;comment('\u6709\u52b9\u671f\u9650');<\/strong>\r\n<strong>        $table-&gt;timestamps();<\/strong>\r\n<strong>    });<\/strong>\r\n}<\/pre>\n<p><strong>database\/migrations\/****_**_**_******_create_question_items_table.php<\/strong><\/p>\n<pre>public function up()\r\n{\r\n    <strong>Schema::create('question_items', function (Blueprint $table) {<\/strong>\r\n<strong>        $table-&gt;id();<\/strong>\r\n<strong>        $table-&gt;unsignedBigInteger('question_id')-&gt;comment('\u8cea\u554fID');<\/strong>\r\n<strong>        $table-&gt;string('option')-&gt;comment('\u9078\u629e\u80a2');<\/strong>\r\n<strong>        $table-&gt;timestamps();<\/strong>\r\n\r\n<strong>        $table-&gt;foreign('question_id')-&gt;references('id')-&gt;on('questions');<\/strong>\r\n<strong>    });<\/strong>\r\n}<\/pre>\n<p><strong>database\/migrations\/****_**_**_******_create_answers_table.php<\/strong><\/p>\n<pre>public function up()\r\n{\r\n    <strong>Schema::create('answers', function (Blueprint $table) {<\/strong>\r\n<strong>        $table-&gt;id();<\/strong>\r\n<strong>        $table-&gt;unsignedBigInteger('user_id')-&gt;comment('\u30e6\u30fc\u30b6\u30fcID');<\/strong>\r\n<strong>        $table-&gt;unsignedBigInteger('question_id')-&gt;comment('\u9078\u629e\u80a2ID');<\/strong>\r\n<strong>        $table-&gt;unsignedBigInteger('question_item_id')-&gt;comment('\u9078\u629e\u80a2ID');<\/strong>\r\n<strong>        $table-&gt;timestamps();<\/strong>\r\n\r\n<strong>        $table-&gt;foreign('user_id')-&gt;references('id')-&gt;on('users');<\/strong>\r\n<strong>        $table-&gt;foreign('question_id')-&gt;references('id')-&gt;on('questions');<\/strong>\r\n<strong>        $table-&gt;foreign('question_item_id')-&gt;references('id')-&gt;on('question_items');<\/strong>\r\n<strong>    });<\/strong>\r\n}<\/pre>\n<p>\u305d\u3057\u3066\u3001\u30e2\u30c7\u30eb\u3067\u3059\u3002<\/p>\n<p><strong>app\/Models\/Question.php<\/strong><\/p>\n<pre>&lt;?php\r\n\r\nnamespace App\\Models;\r\n\r\nuse Illuminate\\Database\\Eloquent\\Factories\\HasFactory;\r\nuse Illuminate\\Database\\Eloquent\\Model;\r\n\r\nclass Question extends Model\r\n{\r\n    use HasFactory;\r\n\r\n<strong>    \/\/ Relationship<\/strong>\r\n<strong>    public function items()<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        return $this-&gt;hasMany(QuestionItem::class, 'question_id', 'id');<\/strong>\r\n<strong>    }<\/strong>\r\n}<\/pre>\n<p><strong>app\/Models\/QuestionItem.php<\/strong><\/p>\n<pre>&lt;?php\r\n\r\nnamespace App\\Models;\r\n\r\nuse Illuminate\\Database\\Eloquent\\Factories\\HasFactory;\r\nuse Illuminate\\Database\\Eloquent\\Model;\r\n\r\nclass QuestionItem extends Model\r\n{\r\n    use HasFactory;\r\n\r\n<strong>    \/\/ Relationship<\/strong>\r\n<strong>    public function answers()<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        return $this-&gt;hasMany(Answer::class, 'question_item_id', 'id');<\/strong>\r\n<strong>    }<\/strong>\r\n}<\/pre>\n<p>\u203b \u306a\u304a\u3001<code>Answer.php<\/code>\u306f\u521d\u671f\u306e\u307e\u307e\u3067OK\u3067\u3059\u3002<\/p>\n<h1>\u30c6\u30b9\u30c8\u30c7\u30fc\u30bf\u3092\u3064\u304f\u308b<\/h1>\n<p>\u7d9a\u3044\u3066\u3001\u958b\u767a\u304c\u3057\u3084\u3059\u3044\u3088\u3046\u306b\u30c6\u30b9\u30c8\u30c7\u30fc\u30bf\u3092<code>Seeder<\/code>\u3067\u3064\u304f\u308a\u307e\u3059\u3002<br \/>\n\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><strong>php artisan make:seed QuestionSeeder<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u3001<code>Seeder<\/code>\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c\u308b\u306e\u3067\u3001\u4e2d\u8eab\u3092\u6b21\u306e\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<p><strong>database\/seeders\/QuestionSeeder.php<\/strong><\/p>\n<pre>&lt;?php\r\n\r\nnamespace Database\\Seeders;\r\n\r\n<strong>use App\\Models\\Question;<\/strong>\r\n<strong>use App\\Models\\QuestionItem;<\/strong>\r\nuse Illuminate\\Database\\Seeder;\r\n\r\nclass QuestionSeeder extends Seeder\r\n{\r\n    \/**\r\n     * Run the database seeds.\r\n     *\r\n     * @return void\r\n     *\/\r\n    <strong>public function run()<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        $test_questions = [<\/strong>\r\n<strong>            [<\/strong>\r\n<strong>                'title' =&gt; '\u597d\u304d\u306a\u52d5\u7269\u306f\uff1f',<\/strong>\r\n<strong>                'options' =&gt; [<\/strong>\r\n<strong>                    '\u72ac',<\/strong>\r\n<strong>                    '\u732b',<\/strong>\r\n<strong>                    '\u30d1\u30f3\u30c0',<\/strong>\r\n<strong>                    '\u30a2\u30e9\u30a4\u30b0\u30de',<\/strong>\r\n<strong>                    '\u30ab\u30e2\u30ce\u30cf\u30b7'<\/strong>\r\n<strong>                ]<\/strong>\r\n<strong>            ],<\/strong>\r\n<strong>            [<\/strong>\r\n<strong>                'title' =&gt; '\u884c\u3063\u3066\u307f\u305f\u3044\u56fd\u306f\uff1f',<\/strong>\r\n<strong>                'options' =&gt; [<\/strong>\r\n<strong>                    '\u30a2\u30e1\u30ea\u30ab',<\/strong>\r\n<strong>                    '\u30a4\u30ae\u30ea\u30b9',<\/strong>\r\n<strong>                    '\u30d5\u30e9\u30f3\u30b9',<\/strong>\r\n<strong>                    '\u30c9\u30a4\u30c4',<\/strong>\r\n<strong>                    '\u30ab\u30ca\u30c0'<\/strong>\r\n<strong>                ]<\/strong>\r\n<strong>            ]<\/strong>\r\n<strong>        ];<\/strong>\r\n\r\n<strong>        foreach ($test_questions as $test_question) {<\/strong>\r\n\r\n<strong>            $question = new Question();<\/strong>\r\n<strong>            $question-&gt;title = $test_question['title'];<\/strong>\r\n<strong>            $question-&gt;expired_at = today()-&gt;addDays(rand(3, 7));<\/strong>\r\n<strong>            $question-&gt;save();<\/strong>\r\n\r\n<strong>            $test_options = $test_question['options'];<\/strong>\r\n\r\n<strong>            foreach ($test_options as $test_option) {<\/strong>\r\n\r\n<strong>                $question_item = new QuestionItem();<\/strong>\r\n<strong>                $question_item-&gt;question_id = $question-&gt;id;<\/strong>\r\n<strong>                $question_item-&gt;option = $test_option;<\/strong>\r\n<strong>                $question_item-&gt;save();<\/strong>\r\n\r\n<strong>            }<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n<strong>    }<\/strong>\r\n}<\/pre>\n<p>\u3067\u306f\u3001\u4f5c\u6210\u3057\u305f<code>QestionSeeder<\/code>\u3092<code>Laravel<\/code>\u3078\u767b\u9332\u3057\u307e\u3059\u3002<\/p>\n<p><strong>database\/seeders\/DatabaseSeeder.php<\/strong><\/p>\n<pre>\/\/ \u7701\u7565\r\n\r\npublic function run()\r\n{\r\n    \/\/ \u7701\u7565\r\n\r\n    <strong>$this-&gt;call(QuestionSeeder::class);<\/strong>\r\n}<\/pre>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u518d\u69cb\u7bc9\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre><strong>php artisan migrate:fresh --seed<\/strong><\/pre>\n<p>\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-9638\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/09\/laravel_poll_feature_1.png\" alt=\"\" width=\"400\" height=\"300\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/09\/laravel_poll_feature_1.png 400w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/09\/laravel_poll_feature_1-300x225.png 300w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9639\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/09\/laravel_poll_feature_2.png\" alt=\"\" width=\"355\" height=\"350\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/09\/laravel_poll_feature_2.png 355w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/09\/laravel_poll_feature_2-300x296.png 300w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/09\/laravel_poll_feature_2-100x100.png 100w\" sizes=\"auto, (max-width: 355px) 100vw, 355px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9640\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/09\/laravel_poll_feature_3.png\" alt=\"\" width=\"382\" height=\"281\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/09\/laravel_poll_feature_3.png 382w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/09\/laravel_poll_feature_3-300x221.png 300w\" sizes=\"auto, (max-width: 382px) 100vw, 382px\" \/><\/p>\n<h1>\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u3092\u3064\u304f\u308b<\/h1>\n<p>\u6b21\u306b\u3001\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3092\u3064\u304f\u308b\u524d\u306b\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\uff08\u5165\u529b\u30c1\u30a7\u30c3\u30af\uff09\u306e\u5c02\u7528<code>FormRequest<\/code>\u3092\u3064\u304f\u3063\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 make:request QuestionRequest<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c\u308b\u306e\u3067\u3001\u4e2d\u8eab\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n<p><strong>app\/Http\/Requests\/QuestionRequest.php<\/strong><\/p>\n<pre>&lt;?php\r\n\r\nnamespace App\\Http\\Requests;\r\n\r\n<strong>use App\\Models\\Answer;<\/strong>\r\nuse Illuminate\\Foundation\\Http\\FormRequest;\r\n<strong>use Illuminate\\Validation\\Rule;<\/strong>\r\n\r\nclass QuestionRequest extends FormRequest\r\n{\r\n    \/\/ \u7701\u7565\r\n\r\n    public function rules()\r\n    {\r\n        <strong>return [<\/strong>\r\n<strong>            'question_id' =&gt; Rule::exists('question_items')-&gt;where(function ($query) { \/\/ question_id \u3068 question_item_id \u306e\u30da\u30a2\u304c\u6b63\u3057\u3044\u304b\u30c1\u30a7\u30c3\u30af<\/strong>\r\n\r\n<strong>                return $query-&gt;where('id', $this-&gt;question_item_id);<\/strong>\r\n\r\n<strong>            }),<\/strong>\r\n<strong>            'question_item_id' =&gt; function ($attribute, $value, $fail) { \/\/ \u6295\u7968\u6e08\u307f\u304b\u3069\u3046\u304b\u30c1\u30a7\u30c3\u30af<\/strong>\r\n\r\n<strong>                $user_id = auth()-&gt;id();<\/strong>\r\n<strong>                $exists = Answer::where('question_id', $this-&gt;question_id)<\/strong>\r\n<strong>                    -&gt;where('user_id', $user_id)<\/strong>\r\n<strong>                    -&gt;exists();<\/strong>\r\n\r\n<strong>                if ($exists === true) {<\/strong>\r\n\r\n<strong>                    $fail('\u3059\u3067\u306b\u6295\u7968\u6e08\u307f\u3067\u3059');<\/strong>\r\n\r\n<strong>                }<\/strong>\r\n\r\n<strong>            },<\/strong>\r\n<strong>        ];<\/strong>\r\n    }\r\n}<\/pre>\n<p>\u306a\u304a\u3001\uff12\u3064\u76ee\u306e\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u306f\u76f4\u63a5<code>function<\/code>\u3092\u4f7f\u3063\u3066\u6307\u5b9a\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u672c\u6765\u306f\u5c02\u7528\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u30fb\u30eb\u30fc\u30eb\u3092\u3064\u304f\u308b\u65b9\u304c\u3044\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n<p>\u3082\u3057\u6c17\u306b\u306a\u308b\u65b9\u306f\u3001\u4ee5\u4e0b\u306e\u30da\u30fc\u30b8\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\ud83d\udcdd \u53c2\u8003\u30da\u30fc\u30b8\uff1a\u00a0<a href=\"https:\/\/blog.capilano-fw.com\/?p=8109#i-2\" target=\"_blank\" rel=\"noopener\">\u72ec\u81ea\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u30fb\u30eb\u30fc\u30eb\u3092\u3064\u304f\u308b<\/a><\/p>\n<h1>\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3092\u3064\u304f\u308b<\/h1>\n<p>\u3067\u306f\u3001\u6b21\u306b\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3092\u3064\u304f\u308a\u307e\u3059\u3002<br \/>\n\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><strong>php artisan make:controller QuestionController<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u3001\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u304c\u4f5c\u6210\u3055\u308c\u308b\u306e\u3067\u4e2d\u8eab\u3092\u6b21\u306e\u3088\u3046\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre>&lt;?php\r\n\r\nnamespace App\\Http\\Controllers;\r\n\r\n<strong>use App\\Http\\Requests\\QuestionRequest;<\/strong>\r\n<strong>use App\\Models\\Answer;<\/strong>\r\n<strong>use App\\Models\\Question;<\/strong>\r\n<strong>use App\\Models\\QuestionItem;<\/strong>\r\nuse Illuminate\\Http\\Request;\r\n\r\nclass QuestionController extends Controller\r\n{\r\n    <strong>public function show(Question $question)<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        $now = now();<\/strong>\r\n\r\n<strong>        if($question-&gt;expired_at &lt; $now) { \/\/ \u3059\u3067\u306b\u6709\u52b9\u671f\u9650\u5207\u308c\u306e\u5834\u5408<\/strong>\r\n\r\n<strong>            abort(404);<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n\r\n<strong>        $question-&gt;load('items');<\/strong>\r\n<strong>        $user_id = auth()-&gt;id();<\/strong>\r\n<strong>        $is_polled = Answer::where('question_id', $question-&gt;id)<\/strong>\r\n<strong>            -&gt;where('user_id', $user_id)<\/strong>\r\n<strong>            -&gt;exists();<\/strong>\r\n\r\n<strong>        return view('question.index')-&gt;with([<\/strong>\r\n<strong>            'question' =&gt; $question,<\/strong>\r\n<strong>            'is_polled' =&gt; $is_polled<\/strong>\r\n<strong>        ]);<\/strong>\r\n<strong>    }<\/strong>\r\n\r\n<strong>    public function result(Question $question)<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        $question_items = QuestionItem::withCount('answers')<\/strong>\r\n<strong>            -&gt;where('question_id', $question-&gt;id)<\/strong>\r\n<strong>            -&gt;orderBy('answers_count', 'desc') \/\/ \u4ef6\u6570\u3067\u4e26\u3073\u66ff\u3048<\/strong>\r\n<strong>            -&gt;get();<\/strong>\r\n<strong>        $all_count = $question_items-&gt;sum('answers_count'); \/\/ \u3059\u3079\u3066\u306e\u6295\u7968\u6570<\/strong>\r\n\r\n<strong>        return $question_items-&gt;map(function($question_item) use($all_count) {<\/strong>\r\n\r\n<strong>            $percentage = ($all_count === 0)<\/strong>\r\n<strong>                ? 0<\/strong>\r\n<strong>                : round($question_item-&gt;answers_count \/ $all_count * 100, 1); \/\/ \u7d50\u679c\u306e\u30d1\u30fc\u30bb\u30f3\u30c8\u5316<\/strong>\r\n\r\n<strong>            return [<\/strong>\r\n<strong>                'option' =&gt; $question_item-&gt;option,<\/strong>\r\n<strong>                'percentage' =&gt; sprintf('%.1f', $percentage) \/\/ .0 \u304c\u6d88\u3048\u308b\u306e\u3067\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u4f7f\u7528<\/strong>\r\n<strong>            ];<\/strong>\r\n\r\n<strong>        });<\/strong>\r\n<strong>    }<\/strong>\r\n\r\n<strong>    public function store(QuestionRequest $request)<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        $answer = new Answer();<\/strong>\r\n<strong>        $answer-&gt;user_id = auth()-&gt;id();<\/strong>\r\n<strong>        $answer-&gt;question_id = $request-&gt;question_id;<\/strong>\r\n<strong>        $answer-&gt;question_item_id = $request-&gt;question_item_id;<\/strong>\r\n<strong>        $result = $answer-&gt;save();<\/strong>\r\n\r\n<strong>        return ['result' =&gt; $result];<\/strong>\r\n<strong>    }<\/strong>\r\n}<\/pre>\n<h1>\u30d3\u30e5\u30fc\u3092\u3064\u304f\u308b<\/h1>\n<p>\u305d\u3057\u3066\u3001\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u5185\u3067\u30bb\u30c3\u30c8\u3057\u305f\u30d3\u30e5\u30fc\u3067\u3059\u3002<br \/>\n\u4ee5\u4e0b\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><strong>resources\/views\/question\/index.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-5\"&gt;<\/strong>\r\n\r\n<strong>    &lt;div class=\"row\" v-if=\"isStatusQuestion\"&gt;<\/strong>\r\n<strong>        &lt;div class=\"col\"&gt;<\/strong>\r\n<strong>            &lt;h3 class=\"mb-3\" v-text=\"question.title\"&gt;&lt;\/h3&gt;<\/strong>\r\n<strong>            &lt;div class=\"d-grid\" v-for=\"item in question.items\"&gt;<\/strong>\r\n<strong>                &lt;button<\/strong>\r\n<strong>                    type=\"button\"<\/strong>\r\n<strong>                    class=\"btn btn-outline-info rounded-pill mb-2\"<\/strong>\r\n<strong>                    v-text=\"item.option\"<\/strong>\r\n<strong>                    @click=\"poll(item.id)\"&gt;&lt;\/button&gt;<\/strong>\r\n<strong>            &lt;\/div&gt;<\/strong>\r\n<strong>        &lt;\/div&gt;<\/strong>\r\n<strong>        &lt;div class=\"col\"&gt;&lt;\/div&gt;<\/strong>\r\n<strong>        &lt;div class=\"col\"&gt;&lt;\/div&gt;<\/strong>\r\n<strong>    &lt;\/div&gt;<\/strong>\r\n\r\n<strong>    &lt;div class=\"row\" v-if=\"isStatusResult\"&gt;<\/strong>\r\n<strong>        &lt;div class=\"col\"&gt;<\/strong>\r\n<strong>            &lt;h3 class=\"mb-3\" v-text=\"question.title\"&gt;&lt;\/h3&gt;<\/strong>\r\n<strong>            &lt;div v-for=\"result in questionResults\"&gt;<\/strong>\r\n<strong>                &lt;v-question-result<\/strong>\r\n<strong>                    :option=\"result.option\"<\/strong>\r\n<strong>                    :percentage=\"result.percentage\"&gt;&lt;\/v-question-result&gt;<\/strong>\r\n<strong>                &lt;br&gt;<\/strong>\r\n<strong>            &lt;\/div&gt;<\/strong>\r\n<strong>        &lt;\/div&gt;<\/strong>\r\n<strong>        &lt;div class=\"col\"&gt;&lt;\/div&gt;<\/strong>\r\n<strong>        &lt;div class=\"col\"&gt;&lt;\/div&gt;<\/strong>\r\n<strong>    &lt;\/div&gt;<\/strong>\r\n\r\n\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:\/\/cdn.jsdelivr.net\/npm\/bootstrap@5.0.1\/dist\/js\/bootstrap.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>    const questionResultComponent = {<\/strong>\r\n<strong>        props: {<\/strong>\r\n<strong>            option: {<\/strong>\r\n<strong>                type: String,<\/strong>\r\n<strong>                default: ''<\/strong>\r\n<strong>            },<\/strong>\r\n<strong>            percentage: {<\/strong>\r\n<strong>                type: Number,<\/strong>\r\n<strong>                default: 0<\/strong>\r\n<strong>            }<\/strong>\r\n<strong>        },<\/strong>\r\n<strong>        computed: {<\/strong>\r\n<strong>            barStyles() {<\/strong>\r\n\r\n<strong>                return {<\/strong>\r\n<strong>                    backgroundColor: '#b2e9f8',<\/strong>\r\n<strong>                    width: `${this.percentage}%`<\/strong>\r\n<strong>                };<\/strong>\r\n\r\n<strong>            }<\/strong>\r\n<strong>        },<\/strong>\r\n<strong>        template: `<\/strong>\r\n<strong>            &lt;div class=\"position-relative py-1\"&gt;<\/strong>\r\n<strong>                &lt;div class=\"position-absolute\" :style=\"barStyles\"&gt;&amp;#8203;&lt;\/div&gt;<\/strong>\r\n<strong>                &lt;div class=\"position-absolute ps-1\" v-text=\"option\"&gt;&lt;\/div&gt;<\/strong>\r\n<strong>                &lt;div class=\"position-absolute\" style=\"right:0;\"&gt;<\/strong>\r\n<strong>                    &lt;span v-text=\"percentage\"&gt;&lt;\/span&gt; %<\/strong>\r\n<strong>                &lt;\/div&gt;<\/strong>\r\n<strong>            &lt;\/div&gt;<\/strong>\r\n<strong>        `<\/strong>\r\n<strong>    };<\/strong>\r\n\r\n<strong>    Vue.createApp({<\/strong>\r\n<strong>        data(){<\/strong>\r\n<strong>            return {<\/strong>\r\n<strong>                status: 'question', \/\/ `question` or `result`<\/strong>\r\n<strong>                question: @json($question),<\/strong>\r\n<strong>                isPolled: @json($is_polled),<\/strong>\r\n<strong>                questionResults: {}<\/strong>\r\n<strong>            }<\/strong>\r\n<strong>        },<\/strong>\r\n<strong>        methods: {<\/strong>\r\n<strong>            poll(questionItemId) {<\/strong>\r\n\r\n<strong>                const url = '{{ route('question.store') }}';<\/strong>\r\n<strong>                const params = {<\/strong>\r\n<strong>                    question_id: this.question.id,<\/strong>\r\n<strong>                    question_item_id: questionItemId<\/strong>\r\n<strong>                };<\/strong>\r\n\r\n<strong>                axios.post(url, 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>                            this.getResult();<\/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>                        alert('\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u30fb\u30a8\u30e9\u30fc');<\/strong>\r\n<strong>                        console.log(errors.response.data);<\/strong>\r\n\r\n<strong>                        \/\/ TODO: \u3053\u3053\u3067\u30a8\u30e9\u30fc\u51e6\u7406<\/strong>\r\n\r\n<strong>                    });<\/strong>\r\n\r\n<strong>            },<\/strong>\r\n<strong>            getResult() {<\/strong>\r\n\r\n<strong>                const url = '{{ route('question.result') }}\/'+ this.question.id;<\/strong>\r\n\r\n<strong>                axios.get(url)<\/strong>\r\n<strong>                    .then(response =&gt; {<\/strong>\r\n\r\n<strong>                        this.status = 'result'; \/\/ \u8868\u793a\u3092\u5207\u308a\u66ff\u3048<\/strong>\r\n<strong>                        this.questionResults = response.data;<\/strong>\r\n\r\n<strong>                    });<\/strong>\r\n\r\n<strong>            }<\/strong>\r\n<strong>        },<\/strong>\r\n<strong>        computed: {<\/strong>\r\n<strong>            isStatusQuestion(){<\/strong>\r\n\r\n<strong>                return (this.status === 'question');<\/strong>\r\n\r\n<strong>            },<\/strong>\r\n<strong>            isStatusResult(){<\/strong>\r\n\r\n<strong>                return (this.status === 'result');<\/strong>\r\n\r\n<strong>            }<\/strong>\r\n<strong>        },<\/strong>\r\n<strong>        mounted() {<\/strong>\r\n\r\n<strong>            if(this.isPolled === true) {<\/strong>\r\n\r\n<strong>                this.getResult();<\/strong>\r\n\r\n<strong>            }<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n<strong>    })<\/strong>\r\n<strong>    .component('v-question-result', questionResultComponent)<\/strong>\r\n<strong>    .mount('#app');<\/strong>\r\n\r\n&lt;\/script&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;<\/pre>\n<p>\u3061\u3087\u3063\u3068\u3053\u3053\u306f\u8907\u96d1\u306a\u306e\u3067\u3059\u304c\u3001\u91cd\u8981\u306a\u70b9\u306f\u3001\u72ec\u81ea\u306e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8<code>questionResultComponent<\/code>\u3092\u3064\u304f\u3063\u3066\u3044\u308b\u3068\u3053\u308d\u3067\u3059\u3002<\/p>\n<h1>\u30eb\u30fc\u30c8\u3092\u3064\u304f\u308b<\/h1>\n<p>\u3067\u306f\u3001\u6700\u5f8c\u306b\u30eb\u30fc\u30c8\u3067\u3059\u3002<br \/>\n\u4eca\u56de\u306f\u30ed\u30b0\u30a4\u30f3\u304c\u5fc5\u9808\u306a\u30b3\u30f3\u30c6\u30f3\u30c4\u3067\u3059\u306e\u3067\u3001\u4e2d\u8eab\u306f\u6b21\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><strong>routes\/web.php<\/strong><\/p>\n<pre>\/\/ \u7701\u7565\r\n\r\n<strong>Route::middleware('auth')-&gt;group(function() {<\/strong>\r\n\r\n<strong>    Route::get('question\/{question}', [QuestionController::class, 'show'])-&gt;name('question.show');<\/strong>\r\n<strong>    Route::get('question\/result\/{question?}', [QuestionController::class, 'result'])-&gt;name('question.result');<\/strong>\r\n<strong>    Route::post('question', [QuestionController::class, 'store'])-&gt;name('question.store');<\/strong>\r\n\r\n<strong>});<\/strong><\/pre>\n<p>\u3053\u308c\u3067\u4f5c\u696d\u306f\u7d42\u4e86\u3067\u3059\u3002<br \/>\n\u304a\u75b2\u308c\u69d8\u3067\u3057\u305f\ud83d\ude0a\u2728<\/p>\n<h1>\u30c6\u30b9\u30c8\u3057\u3066\u307f\u308b<\/h1>\n<p>\u4eca\u56de\u306f400\u56de\u8a18\u5ff5\u3067\u3059\u306e\u3067\u3001\u30c6\u30b9\u30c8\u3057\u3066\u3044\u308b\u52d5\u753b\u3092<code>YouTube<\/code>\u306b\u7528\u610f\u3057\u307e\u3057\u305f\u3002<br \/>\n\u305c\u3072\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u2193\u2193\u2193<\/p>\n<p><a href=\"https:\/\/youtu.be\/ANNOz8WIrVI\">\u30c6\u30b9\u30c8\u52d5\u753b<\/a><\/p>\n<h1>\u4f01\u696d\u69d8\u3078\u306e\u3054\u63d0\u6848<\/h1>\n<p>\u30a2\u30f3\u30b1\u30fc\u30c8\u6a5f\u80fd\u3092\u5229\u7528\u3059\u308b\u3068\u3001\u304a\u5ba2\u3055\u3093\u304b\u3089\u306e\u58f0\u3060\u3051\u3067\u306a\u304f\u793e\u5185\u306e\u610f\u898b\u3084\u65b9\u5411\u6027\u3092\u77e5\u308b\u304d\u3063\u304b\u3051\u306b\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u3082\u3057\u3001\u73fe\u5728\u4f7f\u7528\u3055\u308c\u3066\u3044\u308b\u30b7\u30b9\u30c6\u30e0\u3078\u30a2\u30f3\u30b1\u30fc\u30c8\u6a5f\u80fd\u3092\u3064\u3051\u305f\u3044\u3068\u304a\u8003\u3048\u3067\u3057\u305f\u3089\u305c\u3072\u304a\u6c17\u8efd\u306b\u3054\u9023\u7d61\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u3069\u3046\u305e\u3088\u308d\u3057\u304f\u304a\u9858\u3044\u3044\u305f\u3057\u307e\u3059\u3002m(_ _)m<\/p>\n<h1>\u304a\u308f\u308a\u306b<\/h1>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u4eca\u56de\u306f\u3044\u3064\u3082\u3068\u9055\u3044\u5c11\u3057\u3060\u3051\u672c\u683c\u7684\uff08\u8907\u96d1\uff1f\uff09\u306a\u30b3\u30fc\u30c9\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3057\u305f\u304c\u3001\u3044\u304b\u304c\u3060\u3063\u305f\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n<p>\u6b63\u76f4\u306a\u3068\u3053\u308d\u30d7\u30ed\u30b0\u30e9\u30e0\u521d\u5b66\u8005\u304c\u898b\u305f\u3089\u300c\u3046\u30fc\u3093\u30fb\u30fb\u30fb\u30d7\u30ed\u30b0\u30e9\u30e0\u5acc\u3044\u2757\u300d\u306a\u3093\u3066\u3053\u3068\u306b\u306a\u308b\u304b\u3082\u3057\u308c\u306a\u3044\u306e\u3067\u3001\u5c11\u3057\u60a9\u3093\u3060\u306e\u3067\u3059\u304c\u3001\u306a\u306b\u305b\u4eca\u56de\u306f\u300c<strong>400\u8a18\u4e8b\u8a18\u5ff5<\/strong>\u300d\u3068\u3044\u3046\u3053\u3068\u3067\u30b4\u30ea\u62bc\u3057\u3057\u3066\u307f\u307e\u3057\u305f\uff08\u7b11\uff09<\/p>\n<p>\u3068\u306f\u3044\u3048\u3001\u30b3\u30fc\u30c9\u306f\u9577\u3044\u3067\u3059\u304c\u6ce8\u76ee\u306f\u305d\u3053\u3067\u306f\u306a\u304f\u3001\u300c<strong>\u7d50\u5c40\u77ed\u3044\u30b3\u30fc\u30c9\u306e\u96c6\u5408\u4f53\u306a\u3093\u3060\u306a<\/strong>\u300d\u3068\u611f\u3058\u3066\u3044\u305f\u3060\u3051\u305f\u3089\u5b09\u3057\u3044\u3067\u3059\u3002<\/p>\n<p>\u9577\u5e74\u30b3\u30fc\u30c9\u3092\u66f8\u3044\u3066\u3044\u308b\u79c1\u3067\u3082\uff11\u884c\u76ee\u304b\u3089\u6700\u5f8c\u306e\u884c\u307e\u3067\u3092\u30b9\u30e9\u30b9\u30e9\u66f8\u3044\u3066\u3044\u308b\u308f\u3051\u3067\u306f\u306a\u304f\u3001\u3042\u3063\u3061\u306b\u884c\u3063\u305f\u308a\u3053\u3063\u3061\u306b\u884c\u3063\u305f\u308a\u3001\u306f\u305f\u307e\u305f\u9577\u3059\u304e\u308b\u304b\u3089\u5206\u5272\u3057\u305f\u308a\u3068\u3044\u3046\u4f5c\u696d\u3092\u304f\u308a\u304b\u3048\u3057\u3066\u3044\u308b\u306b\u904e\u304e\u307e\u305b\u3093\u3002<\/p>\n<p>\u3064\u307e\u308a\u3001\u6839\u672c\u3092\u898b\u3064\u3051\u305f\u3089\u3042\u308b\u7a0b\u5ea6\u3069\u3053\u308d\u304b\u3001\u306a\u304c\u30fc\u30fc\u30fc\u30fc\u30fc\u30fc\u30fc\u30fc\u30fc\u30fc\u30fc\u30fc\u30fc\u30fc\u30fc\u3044\uff08\u4eac\u90fd\u9280\u884c\u306eCM\u77e5\u3063\u3066\u307e\u3059\uff1f\uff09\u30b3\u30fc\u30c9\u3067\u3082\u305d\u308c\u307b\u3069\u6016\u304f\u306f\u306a\u304f\u306a\u3063\u3066\u304f\u308b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u305c\u3072\u3044\u3044\u304d\u3063\u304b\u3051\u306b\u306a\u308a\u307e\u3057\u305f\u3089\u5b09\u3057\u3044\u3067\u3059\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-6070 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/03\/no_5.png\" alt=\"\" width=\"260\" height=\"320\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/03\/no_5.png 260w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/03\/no_5-244x300.png 244w\" sizes=\"auto, (max-width: 260px) 100vw, 260px\" \/>\u300c\u5f53\u521d\u306f\u30d6\u30ed\u30b0\u306a\u3093\u3066<br \/>\n\u3059\u3050\u3084\u3081\u308b\u3093\u3060\u308d\u3046\u306a<br \/>\n\u3063\u3066\u601d\u3063\u3066\u307e\u3057\u305f\uff08\u7b11\uff09\u300d<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3010\u7686\u3055\u3093\u3078\u306e\u304a\u793c\u3011 \u4eca\u56de\u3067\u306a\u3093\u3068400\u8a18\u4e8b\u306b\u306a\u308a\u307e\u3059\u2757 \u307b\u307c\u4f55\u3082\u7d9a\u304b\u306a\u3044\u79c1\u3067\u3059\u304c\u3001\u307f\u306a\u3055\u3093\u304c\u8a18\u4e8b\u3092\u8aad\u307f\u306b\u6765\u3066\u3044\u305f\u3060\u3051\u308b\u304a\u304b\u3052\u3067\u3053\u3053\u307e\u3067\u7d9a\u3051\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3057\u305f\u3002  &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.capilano-fw.com\/?p=9633\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;Laravel \u3067\u30c4\u30a4\u30c3\u30bf\u30fc\u307f\u305f\u3044\u306a\u30a2\u30f3\u30b1\u30fc\u30c8\u6a5f\u80fd\u3092\u3064\u304f\u308b&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":9643,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,12],"tags":[],"class_list":["post-9633","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-laravel","category-vue-js"],"_links":{"self":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/9633","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=9633"}],"version-history":[{"count":7,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/9633\/revisions"}],"predecessor-version":[{"id":9644,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/9633\/revisions\/9644"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/media\/9643"}],"wp:attachment":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9633"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9633"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9633"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}