{"id":8659,"date":"2021-03-08T07:00:44","date_gmt":"2021-03-07T22:00:44","guid":{"rendered":"https:\/\/blog.capilano-fw.com\/?p=8659"},"modified":"2021-02-27T05:30:25","modified_gmt":"2021-02-26T20:30:25","slug":"__trashed-4","status":"publish","type":"post","link":"https:\/\/blog.capilano-fw.com\/?p=8659","title":{"rendered":"\u3010Laravel\u3011AB\u30c6\u30b9\u30c8\u6a5f\u80fd\u3092\u3064\u304f\u308b"},"content":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u30d7\u30ed\u30b0\u30e9\u30de\u30fc\u306b\u9650\u3089\u305a\u3067\u3059\u304c\u3001\u591a\u304f\u306e\u4eba\u306f\u30b9\u30ad\u30eb\u30a2\u30c3\u30d7\u3084\u30ad\u30e3\u30ea\u30a2\u30a2\u30c3\u30d7\u304c\u982d\u306e\u4e2d\u306b\u3042\u3063\u305f\u308a\u3059\u308b\u3093\u3058\u3083\u306a\u3044\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n<p>\u304b\u304f\u3044\u3046\u79c1\u3082\u3001\u3088\u308a\u300c<strong>\u81ea\u5206\u306e\u4fa1\u5024<\/strong>\u300d\u3092\u9ad8\u304f\u3067\u304d\u305f\u3089\u3044\u3044\u306a\u3068\u601d\u3044\uff08\u8208\u5473\u304c\u308f\u3051\u3070\u3001\u3067\u3059\u304c\ud83d\ude02\uff09\u3044\u308d\u3044\u308d\u3068\u65b0\u3057\u3044\u5206\u91ce\u306b\u89e6\u308c\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u3057\u3066\u3001\u305d\u3093\u306a\u4e2d<code>Laravel<\/code>\u3067\u3072\u3068\u3064\u4f5c\u3063\u3066\u307f\u305f\u3044\u6a5f\u80fd\u304c\u982d\u306b\u6d6e\u304b\u3073\u307e\u3057\u305f\u3002<\/p>\n<p>\u305d\u308c\u304c\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb<\/p>\n<p><strong style=\"font-size: 35px;\">AB\u30c6\u30b9\u30c8\uff08Split Testing\uff09<\/strong><\/p>\n<p>\u3067\u3059\u3002<\/p>\n<p>AB\u30c6\u30b9\u30c8\u3068\u306f\u3001\u7c21\u5358\u306b\u8a00\u3046\u3068\u300c<strong>\u3042\u308b\uff12\u3064\uff08\u4ee5\u4e0a\uff09\u306e\u753b\u50cf\u3092\u7528\u610f\u3057\u3001\u3069\u3061\u3089\u306e\u65b9\u304c\u3088\u308a\u591a\u304f\u30af\u30ea\u30c3\u30af\u3055\u308c\u305f\u304b\uff1f<\/strong>\u300d\u3092\u8abf\u3079\u308b\u30c6\u30b9\u30c8\u306e\u3053\u3068\u3067\u3059\u3002<\/p>\n<p>\u305d\u3057\u3066\u30c6\u30b9\u30c8\u306e\u7d50\u679c\u3092\u898b\u308c\u3070\u3001<strong>\u3088\u308a\u30a6\u30b1\u304c\u3044\u3044\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u77e5\u308b\u3053\u3068\u304c\u3067\u304d\u308b<\/strong>\u3068\u3044\u3046\u308f\u3051\u3067\u3059\u306d\u3002<\/p>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u4eca\u56de\u306f\u300c<strong>\u30bb\u30fc\u30eb\u3084\u3063\u3066\u307e\u3059\uff01<\/strong>\u300d\u7684\u306a\u753b\u50cf\u3067 AB\u30c6\u30b9\u30c8\u3092\u5b9f\u88c5\u3057\u3066\u307f\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\ud83d\ude0a<br \/>\n\uff08\u6700\u5f8c\u306b\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u4e00\u5f0f\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3067\u304d\u307e\u3059\u3088\ud83d\udc4d\uff09<\/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\" \/>\u300c\u3082\u3057\u304b\u3057\u3066<br \/>\n\u30b7\u30e5\u30ec\u30c3\u30c0\u30fc\u306e\u304f\u305a\u3067<br \/>\n\u3044\u3044\u6795\u3067\u304d\u308b\u3093\u3058\u3083\uff1f\uff1f\u300d<\/p>\n<p><strong>\u958b\u767a\u74b0\u5883\uff1a<\/strong> Laravel 8.x<\/p>\n<h1>\u3084\u308a\u305f\u3044\u3053\u3068<\/h1>\n<p>\u4eca\u56de\u306f\uff12\u7a2e\u985e\u306e\u753b\u50cf\u3092\u7528\u610f\u3057\u3066\u3001\u300c<strong>\u3088\u308a\u30af\u30ea\u30c3\u30af\u3055\u308c\u308b\u306e\u306f\u3069\u3063\u3061\u2753\u2753<\/strong>\u300d\u3092\u30c6\u30b9\u30c8\u3057\u3066\u307f\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u5229\u7528\u3059\u308b\u753b\u50cf\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<p><strong>A\u753b\u50cf\uff08black-friday-a.png\uff09<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8692\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/02\/laravel_split_testing_1.png\" alt=\"\" width=\"640\" height=\"184\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/02\/laravel_split_testing_1.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/02\/laravel_split_testing_1-300x86.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p><strong>B\u753b\u50cf\uff08black-friday-b.png\uff09<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8690\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/02\/laravel_split_testing_2.png\" alt=\"\" width=\"640\" height=\"184\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/02\/laravel_split_testing_2.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/02\/laravel_split_testing_2-300x86.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u753b\u50cf\u306f\u4ee5\u4e0b\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3055\u305b\u3066\u3044\u305f\u3060\u304d\u307e\u3057\u305f\u3002\uff08\u30b5\u30a4\u30ba\u306f\u52a0\u5de5\u3057\u3066\u3044\u307e\u3059\uff09\u611f\u8b1d\uff01<\/p>\n<p>\u3010\u5143\u753b\u50cf\u3011<br \/>\n<a href=\"https:\/\/pixabay.com\/illustrations\/black-friday-christmas-1898114\/\">https:\/\/pixabay.com\/illustrations\/black-friday-christmas-1898114\/<\/a><br \/>\n<a href=\"https:\/\/pixabay.com\/illustrations\/black-friday-christmas-1878945\/\">https:\/\/pixabay.com\/illustrations\/black-friday-christmas-1878945\/<\/a><\/p>\n<p>\u306a\u304a\u3001\u6bce\u56de\u30e9\u30f3\u30c0\u30e0\u3067\u753b\u50cf\u304c\u5207\u308a\u66ff\u308f\u308b\u3068\u30c6\u30b9\u30c8\u7d50\u679c\u306e\u4fe1\u983c\u6027\u304c\u4f4e\u304f\u306a\u3063\u3066\u3057\u307e\u3046\u306e\u3067\u3001\u5404\u30d6\u30e9\u30a6\u30b6\u3054\u3068\u306b\u300c<strong>\u5e38\u306b\u540c\u3058\u753b\u50cf\u3092\u8868\u793a<\/strong>\u300d\u3057\u307e\u3059\u3002<\/p>\n<p>\u305d\u306e\u305f\u3081\u3001<code>Cookie<\/code>\u3092\u4f7f\u3063\u305f\u4ee5\u4e0b\u306e\u624b\u9806\u3067\u5b9f\u88c5\u3057\u307e\u3059\u3002<\/p>\n<ol>\n<li>\u8868\u793a\u3057\u305f\u6642\u70b9\u3067 Cookie \u306b\u300c\u3069\u3061\u3089\u306e\u753b\u50cf\u3092\u8868\u793a\u3057\u305f\u304b\u300d\u306e\u30c7\u30fc\u30bf\u3092\u30bb\u30c3\u30c8\u3059\u308b<\/li>\n<li>\u6b21\u56de\u30a2\u30af\u30bb\u30b9\u3057\u3066\u304d\u305f\u3068\u304d\u306f Cookie \u306e\u5024\u3092\u30c1\u30a7\u30c3\u30af\u3057\u3066\u524d\u56de\u3068\u540c\u3058\u753b\u50cf\u3092\u8868\u793a\u3059\u308b<\/li>\n<\/ol>\n<p>\u306a\u304a\u3001\u5b9f\u969b\u306b\u300c<strong>\u30c6\u30b9\u30c8\u30da\u30fc\u30b8\u304b\u3089\u79fb\u52d5\u3057\u3066\u304d\u305f\u304b\u3069\u3046\u304b\u2753\u2753<\/strong>\u300d\u306f\u30ea\u30f3\u30af\u306b\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u542b\u3081\u3066\u5224\u5225\u3059\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<p>\u3067\u306f\u3001\u697d\u3057\u3093\u3067\u3084\u3063\u3066\u307f\u307e\u3057\u3087\u3046\u2757<\/p>\n<h1>AB\u30c6\u30b9\u30c8\u306e\u7d50\u679c\u3092\u4fdd\u5b58\u3059\u308b\u30c6\u30fc\u30d6\u30eb\u3092\u3064\u304f\u308b<\/h1>\n<p>\u3067\u306f\u3001\u307e\u305aAB\u30c6\u30b9\u30c8\u306e\u7d50\u679c\u3092\u4fdd\u5b58\u3057\u3066\u304a\u304f\u30c6\u30fc\u30d6\u30eb<code>split_testings<\/code>\u3092\u3064\u304f\u308a\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><strong>php artisan make:model SplitTesting -m<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u3001\u30e2\u30c7\u30eb\u3068\u540c\u6642\u306b\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\uff08\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30fb\u30c6\u30fc\u30d6\u30eb\u306e\u8a2d\u8a08\u56f3\uff09\u304c\u4f5c\u6210\u3055\u308c\u308b\u306e\u3067\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5909\u66f4\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><strong>database\/migrations\/****_**_**_******_create_split_testings_table.php<\/strong><\/p>\n<pre>\/\/ \u7701\u7565\r\n\r\n<strong>Schema::create('split_testings', function (Blueprint $table) {<\/strong>\r\n<strong>    $table-&gt;id();<\/strong>\r\n<strong>    $table-&gt;string('name')-&gt;comment('\u30c6\u30b9\u30c8\u540d');<\/strong>\r\n<strong>    $table-&gt;string('view_index')-&gt;comment('\u30d3\u30e5\u30fc\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u756a\u53f7'); \/\/ \u3064\u307e\u308a\u3001AB\u3069\u3061\u3089\u306e\u8868\u793a\u304b<\/strong>\r\n<strong>    $table-&gt;uuid('uuid')-&gt;comment('UUID'); \/\/ \u500b\u4eba\u306e\u7279\u5b9a\u7528<\/strong>\r\n<strong>    $table-&gt;boolean('accessed')-&gt;default(false)-&gt;comment('\u30a2\u30af\u30bb\u30b9\u3055\u308c\u305f\u304b\u3069\u3046\u304b');<\/strong>\r\n<strong>    $table-&gt;timestamps();<\/strong>\r\n<strong>});<\/strong>\r\n\r\n\/\/ \u7701\u7565<\/pre>\n<p>\u3067\u306f\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u30c6\u30fc\u30d6\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre><strong>php artisan migrate<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u3001\u30c6\u30fc\u30d6\u30eb\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8691\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/02\/laravel_split_testing_3.png\" alt=\"\" width=\"426\" height=\"291\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/02\/laravel_split_testing_3.png 426w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/02\/laravel_split_testing_3-300x205.png 300w\" sizes=\"auto, (max-width: 426px) 100vw, 426px\" \/><\/p>\n<h1>Blade\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u3064\u304f\u308b<\/h1>\n<p>\u3067\u306f\u3001AB\u306e\u753b\u50cf\u3092\u5207\u308a\u66ff\u3048\u308b\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092<code>Blade\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8<\/code>\u3067\u4f5c\u3063\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u4f7f\u3044\u65b9\u306f\u6b21\u306e\u3088\u3046\u306a\u30ab\u30f3\u30b8\u3067\u3059\u3002<\/p>\n<pre><strong>&lt;x-split-testing name=\"black_friday_sale_2021\" :views=\"$views\"&gt;&lt;\/x-split-testing&gt;<\/strong><\/pre>\n<p>\u203b <code>$views<\/code>\u306f\u3001\u914d\u5217\u306e\u30d3\u30e5\u30fc\u306e\u30d1\u30b9\u3067\u3059\u3002<\/p>\n<h2>\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u30fb\u30af\u30e9\u30b9\u3092\u3064\u304f\u308b<\/h2>\n<p>\u307e\u305a\u306f\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><strong>php artisan make:component SplitTesting<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u3001\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c\u308b\u306e\u3067\u4e2d\u8eab\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n<p><strong>app\/View\/Components\/SplitTesting.php<\/strong><\/p>\n<pre>&lt;?php\r\n\r\nnamespace App\\View\\Components;\r\n\r\nuse Illuminate\\Support\\Arr;\r\nuse Illuminate\\Support\\Str;\r\nuse Illuminate\\View\\Component;\r\nuse App\\Models\\SplitTesting as SplitTestingModel;\r\n\r\nclass SplitTesting extends Component\r\n{\r\n    <strong>private $name, $views;<\/strong>\r\n\r\n<strong>    public function __construct($name, $views)<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        $this-&gt;name = $name;<\/strong>\r\n<strong>        $this-&gt;views = $views;<\/strong>\r\n<strong>    }<\/strong>\r\n\r\n<strong>    public function render()<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        $view = $this-&gt;getView();<\/strong>\r\n<strong>        return view($view);<\/strong>\r\n<strong>    }<\/strong>\r\n\r\n<strong>    private function getKey() {<\/strong>\r\n\r\n<strong>        return 'split_testing_'. $this-&gt;name;<\/strong>\r\n\r\n<strong>    }<\/strong>\r\n\r\n<strong>    private function getView() {<\/strong>\r\n\r\n<strong>        $existing_index = $this-&gt;getExistingViewIndex();<\/strong>\r\n\r\n<strong>        if($existing_index &gt; -1) { \/\/ \u3059\u3067\u306b\u8868\u793a\u6e08\u307f\u306e\u5834\u5408\uff08\u524d\u56de\u3068\u540c\u3058\u3082\u306e\u3092\u8868\u793a\u3059\u308b\uff09<\/strong>\r\n\r\n<strong>            $cookie_index = $existing_index;<\/strong>\r\n\r\n<strong>        } else {<\/strong>\r\n\r\n<strong>            $cookie_index = $this-&gt;getRandomViewIndex();<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n\r\n<strong>        return $this-&gt;views[$cookie_index];<\/strong>\r\n\r\n<strong>    }<\/strong>\r\n\r\n<strong>    private function getExistingViewIndex() {<\/strong>\r\n\r\n<strong>        foreach($this-&gt;views as $index =&gt; $view) {<\/strong>\r\n\r\n<strong>            $key = $this-&gt;getKey();<\/strong>\r\n\r\n<strong>            if(\\Cookie::has($key)) {<\/strong>\r\n\r\n<strong>                $cookie_data = json_decode(<\/strong>\r\n<strong>                    \\Cookie::get($key)<\/strong>\r\n<strong>                );<\/strong>\r\n<strong>                return $cookie_data-&gt;index;<\/strong>\r\n\r\n<strong>            }<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n\r\n<strong>        return -1;<\/strong>\r\n\r\n<strong>    }<\/strong>\r\n\r\n<strong>    private function getRandomViewIndex() {<\/strong>\r\n\r\n<strong>        \/\/ \u30ad\u30e3\u30c3\u30b7\u30e5\u4fdd\u5b58<\/strong>\r\n<strong>        $key = $this-&gt;getKey();<\/strong>\r\n<strong>        $view_index = \\Cache::get($key, -1); \/\/ \u521d\u671f\u5024\u306f -1\uff08\u3064\u307e\u308a\u6700\u521d\u306f\u6b21\u306e\u884c\u3067\u30bc\u30ed\u306b\u306a\u308b\uff09<\/strong>\r\n<strong>        $view_index++;<\/strong>\r\n\r\n<strong>        if(!Arr::has($this-&gt;views, $view_index)) {<\/strong>\r\n\r\n<strong>            $view_index = 0;<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n\r\n<strong>        \\Cache::put($key, $view_index);<\/strong>\r\n\r\n<strong>        \/\/ Cookie \u4fdd\u5b58<\/strong>\r\n<strong>        $uuid = Str::uuid();<\/strong>\r\n<strong>        $cookie_values = [<\/strong>\r\n<strong>            'index' =&gt; $view_index,<\/strong>\r\n<strong>            'uuid' =&gt; $uuid<\/strong>\r\n<strong>        ];<\/strong>\r\n\r\n<strong>        \\Cookie::queue($key, json_encode($cookie_values) , 2628000); \/\/ 5\u5e74\u9593\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4fdd\u5b58<\/strong>\r\n\r\n<strong>        \/\/ DB\u306b\u753b\u50cf\u304c\u8868\u793a\u3055\u308c\u305f\u30c7\u30fc\u30bf\u3092\u4fdd\u5b58<\/strong>\r\n<strong>        $split_testing = new SplitTestingModel();<\/strong>\r\n<strong>        $split_testing-&gt;name = $this-&gt;name;<\/strong>\r\n<strong>        $split_testing-&gt;view_index = $view_index;<\/strong>\r\n<strong>        $split_testing-&gt;uuid = $uuid;<\/strong>\r\n<strong>        $split_testing-&gt;save();<\/strong>\r\n\r\n<strong>        return $view_index;<\/strong>\r\n\r\n<strong>    }<\/strong>\r\n}<\/pre>\n<p>\u3053\u306e\u4e2d\u3067\u3084\u3063\u3066\u3044\u308b\u3053\u3068\u306f\u4ee5\u4e0b\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<ul>\n<li>\u904e\u53bb\u306bAB\u30c6\u30b9\u30c8\u3067\u753b\u50cf\u3092\u8868\u793a\u3057\u3066\u3044\u308b\u304b\u30c1\u30a7\u30c3\u30af<\/li>\n<li>\u8868\u793a\u3057\u3066\u3044\u305f\u3089\u3001\u305d\u306e\u3068\u304d\u3068\u540c\u3058\u753b\u50cf\u3092\u8868\u793a<\/li>\n<li>\u305d\u3046\u3067\u306a\u3044\u5834\u5408\u306f\u3001\u30e9\u30f3\u30c0\u30e0\u306b A \u2194 B\u3067\u753b\u50cf\u3092\u5207\u308a\u66ff\u3048\u3001\u305d\u306e\u30c7\u30fc\u30bf\u3092 Cookie \u306b\u4fdd\u5b58\uff08\u3064\u307e\u308a\u3001\u6b21\u56de\u304b\u3089\u306f\u540c\u3058\u753b\u50cf\u304c\u8868\u793a\u3055\u308c\u308b\uff09<\/li>\n<\/ul>\n<p>\u203b \u3061\u306a\u307f\u306b\u3001\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u30fb\u30af\u30e9\u30b9\u306f<code>Laravel 7.x<\/code>\u304b\u3089\u5c0e\u5165\u3055\u308c\u307e\u3057\u305f\u3002<br \/>\n\u8a73\u3057\u304f\u306f\u4ee5\u4e0b\u306e\u8a18\u4e8b\u3092\u3054\u89a7\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=5993\">Laravel 7.x\u306e\u65b0\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u6a5f\u80fd\uff01\u5b9f\u4f8b<\/a><\/p>\n<p>\u306a\u304a\u3001\u3053\u306e\u4e2d\u3067\uff11\u70b9\u6c17\u3092\u3064\u3051\u3066\u3044\u305f\u3060\u304d\u305f\u3044\u306e\u304c\u4ee5\u4e0b\u306e\u90e8\u5206\u3067\u3059\u3002<\/p>\n<pre><strong>use App\\Models\\SplitTesting as SplitTestingModel;<\/strong><\/pre>\n<p>\u3053\u308c\u306f\u4eca\u56de\u4f5c\u6210\u3057\u305f\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u30fb\u30af\u30e9\u30b9\u3068DB\u7528\u30e2\u30c7\u30eb\u306e\u30af\u30e9\u30b9\u540d\u304c\u540c\u3058\u305f\u3081\u3001\u300c<strong>\u91cd\u8907\u3059\u308b\u30af\u30e9\u30b9\u304c\u3042\u308b\u3088&#8230;\ud83d\ude2b<\/strong>\u300d\u3068\u30a8\u30e9\u30fc\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u305d\u306e\u305f\u3081\u3001\u30e2\u30c7\u30eb\u306e\u30af\u30e9\u30b9\u540d\u3092\u4e00\u6642\u7684\u306b\u300c<strong>SplitTestingModel<\/strong>\u300d\u3078\u5909\u66f4\u3057\u3066\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<h1>AB\u30c6\u30b9\u30c8\u3092\u8a2d\u7f6e\u3059\u308b<\/h1>\n<p>\u3067\u306f\u3001\u5148\u307b\u3069\u3064\u304f\u3063\u305fAB\u30c6\u30b9\u30c8\u3092\u5b9f\u969b\u306b<code>Laravel<\/code>\u306b\u8a2d\u7f6e\u3057\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<h2>\u30d3\u30e5\u30fc\u3092\u3064\u304f\u308b<\/h2>\n<p>\u4f5c\u6210\u3059\u308b\u30d3\u30e5\u30fc\u306f\u4ee5\u4e0b\u306e\uff13\u3064\u3067\u3059\u3002<\/p>\n<ul>\n<li>\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u8868\u793a\u3059\u308b\u30d3\u30e5\u30fc<\/li>\n<li>AB\u30c6\u30b9\u30c8\u7528\u306e\u30d3\u30e5\u30fc\u300cA\u300d<\/li>\n<li>AB\u30c6\u30b9\u30c8\u7528\u306e\u30d3\u30e5\u30fc\u300cB\u300d<\/li>\n<\/ul>\n<p>\u4e2d\u8eab\u306f\u305d\u308c\u305e\u308c\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><strong>\uff11\uff0e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u8868\u793a\u3059\u308b\u30d3\u30e5\u30fc<\/strong><\/p>\n<p><strong>resources\/views\/split_testing.blade.php<\/strong><\/p>\n<pre><strong>&lt;html&gt;<\/strong>\r\n<strong>&lt;body&gt;<\/strong>\r\n<strong>&lt;div id=\"app\"&gt;<\/strong>\r\n<strong>    &lt;x-split-testing name=\"black_friday_sale_2021\" :views=\"$views\"&gt;&lt;\/x-split-testing&gt;<\/strong>\r\n<strong>&lt;\/div&gt;<\/strong>\r\n<strong>&lt;\/body&gt;<\/strong>\r\n<strong>&lt;\/html&gt;<\/strong><\/pre>\n<p><strong>\uff12\uff0eAB\u30c6\u30b9\u30c8\u7528\u306e\u30d3\u30e5\u30fc\u300cA\u300d<\/strong><\/p>\n<p><strong>resources\/views\/split_testing\/black_friday_sale_a.blade.php<\/strong><\/p>\n<pre><strong>&lt;h1&gt;\u305f\u3060\u3044\u307e\u30bb\u30fc\u30eb\u4e2d\uff01&lt;\/h1&gt;<\/strong>\r\n<strong>&lt;a href=\"\/split_testing\/sale?split_testing=black_friday_sale_2021\"&gt;<\/strong>\r\n<strong>    &lt;img src=\"\/images\/black_friday_a.png\"&gt;<\/strong>\r\n<strong>&lt;\/a&gt;<\/strong><\/pre>\n<p><strong>\uff12\uff0eAB\u30c6\u30b9\u30c8\u7528\u306e\u30d3\u30e5\u30fc\u300cB\u300d<\/strong><\/p>\n<p><strong>resources\/views\/split_testing\/black_friday_sale_b.blade.php<\/strong><\/p>\n<pre><strong>&lt;h1&gt;\u305f\u3060\u3044\u307e\u30bb\u30fc\u30eb\u4e2d\uff01&lt;\/h1&gt;<\/strong>\r\n<strong>&lt;a href=\"\/split_testing\/sale?split_testing=black_friday_sale_2021\"&gt;<\/strong>\r\n<strong>    &lt;img src=\"\/images\/black_friday_b.png\"&gt;<\/strong>\r\n<strong>&lt;\/a&gt;<\/strong><\/pre>\n<h2>\u30eb\u30fc\u30c8\u3092\u3064\u304f\u308b<\/h2>\n<p>\u6b21\u306b\u300c<strong>\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u8868\u793a\u3059\u308b\u30d3\u30e5\u30fc<\/strong>\u300d\u3092\u547c\u3073\u51fa\u3059\u305f\u3081\u306e\u30eb\u30fc\u30c8\u3092\u3064\u304f\u308a\u307e\u3059\u3002<\/p>\n<p><strong>routes\/web.php<\/strong><\/p>\n<pre>\/\/ \u7701\u7565\r\n\r\n<strong>use App\\Http\\Controllers\\SplitTestingController;<\/strong>\r\n\r\n<strong>Route::get('split_testing\/top', [SplitTestingController::class, 'top']);<\/strong>\r\n<strong>Route::get('split_testing\/sale', [SplitTestingController::class, 'sale']);<\/strong>\r\n\r\n\/\/ \u7701\u7565<\/pre>\n<p>\u8a2d\u5b9a\u3057\u3066\u3044\u308b\u306e\u306f\u6b21\u306e\uff12\u3064\u3067\u3059\u3002<\/p>\n<ul>\n<li>top: AB\u30c6\u30b9\u30c8\u306e\u753b\u50cf\u3092\u8868\u793a\u3059\u308b\u30eb\u30fc\u30c8\uff08\u30c8\u30c3\u30d7\u30da\u30fc\u30b8\u3092\u60f3\u5b9a\u3057\u3066\u3044\u307e\u3059\uff09<\/li>\n<li>sale: \u30bb\u30fc\u30eb\u306e\u30da\u30fc\u30b8\uff08\u753b\u50cf\u304c\u30af\u30ea\u30c3\u30af\u3055\u308c\u305f\u3089\u30a2\u30af\u30bb\u30b9\u3055\u308c\u305f\u3082\u306e\u3068\u3057\u3066\u30c7\u30fc\u30bf\u4fdd\u5b58\uff09<\/li>\n<\/ul>\n<h2>\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3092\u3064\u304f\u308b<\/h2>\n<p>\u3067\u306f\u3001\u30eb\u30fc\u30c8\u3067\u30bb\u30c3\u30c8\u3057\u305f\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3092\u3064\u304f\u308a\u307e\u3057\u3087\u3046\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 SplitTestingController<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u3001\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c\u308b\u306e\u3067\u4e2d\u8eab\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n<p><strong>app\/Http\/Controllers\/SplitTestingController.php<\/strong><\/p>\n<pre>&lt;?php\r\n\r\nnamespace App\\Http\\Controllers;\r\n\r\nuse App\\Models\\SplitTesting;\r\nuse Illuminate\\Http\\Request;\r\n\r\nclass SplitTestingController extends Controller\r\n{\r\n    <strong>public function top() {<\/strong>\r\n\r\n<strong>        $views = [<\/strong>\r\n<strong>            'split_testing.black_friday_sale_a',<\/strong>\r\n<strong>            'split_testing.black_friday_sale_b'<\/strong>\r\n<strong>        ];<\/strong>\r\n\r\n<strong>        return view('split_testing')-&gt;with([<\/strong>\r\n<strong>            'views' =&gt; $views<\/strong>\r\n<strong>        ]);<\/strong>\r\n\r\n<strong>    }<\/strong>\r\n\r\n<strong>    public function sale(Request $request) {<\/strong>\r\n\r\n<strong>        if($request-&gt;filled('split_testing')) {<\/strong>\r\n\r\n<strong>            $split_testing_name = $request-&gt;split_testing;<\/strong>\r\n<strong>            $cookie_key = 'split_testing_'. $split_testing_name;<\/strong>\r\n\r\n<strong>            if(\\Cookie::has($cookie_key)) {<\/strong>\r\n\r\n<strong>                $cookie_data = json_decode(<\/strong>\r\n<strong>                    \\Cookie::get($cookie_key)<\/strong>\r\n<strong>                );<\/strong>\r\n<strong>                $view_index = $cookie_data-&gt;index;<\/strong>\r\n<strong>                $uuid = $cookie_data-&gt;uuid;<\/strong>\r\n\r\n<strong>                $split_testing = SplitTesting::where('name', $split_testing_name)<\/strong>\r\n<strong>                    -&gt;where('view_index', $view_index)<\/strong>\r\n<strong>                    -&gt;where('uuid', $uuid)<\/strong>\r\n<strong>                    -&gt;first();<\/strong>\r\n\r\n<strong>                if(!is_null($split_testing)) {<\/strong>\r\n\r\n<strong>                    $split_testing-&gt;accessed = true;<\/strong>\r\n<strong>                    $split_testing-&gt;save();<\/strong>\r\n\r\n<strong>                }<\/strong>\r\n\r\n<strong>            }<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n\r\n<strong>        return '\u30bb\u30fc\u30eb\u4e2d\u3067\u3059\uff01';<\/strong>\r\n\r\n<strong>    }<\/strong>\r\n}<\/pre>\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<\/p>\n<p>\u307e\u305a\u30d6\u30e9\u30a6\u30b6\u3067\u300c<strong>http:\/\/******\/split_testing\/top<\/strong>\u300d\u3078\u30a2\u30af\u30bb\u30b9\u3057\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8695\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/02\/laravel_split_testing_4.png\" alt=\"\" width=\"640\" height=\"258\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/02\/laravel_split_testing_4.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/02\/laravel_split_testing_4-300x121.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u3059\u308b\u3068\u300c<strong>A<\/strong>\u300d\u306e\u753b\u50cf\u304c\u8868\u793a\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<p>\u3067\u306f\u3001DB\u3092\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8697\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/02\/laravel_split_testing_5.png\" alt=\"\" width=\"640\" height=\"260\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/02\/laravel_split_testing_5.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/02\/laravel_split_testing_5-300x122.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u304d\u3061\u3093\u3068\u300c<strong>A\uff08\uff1d\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c\u30bc\u30ed\uff09<\/strong>\u300d\u306e\u30c7\u30fc\u30bf\u304c\u767b\u9332\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3067\u306f\u3001<code>Cookie<\/code>\u306e\u65b9\u306f\u3069\u3046\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8699\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/02\/laravel_split_testing_7.png\" alt=\"\" width=\"640\" height=\"108\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/02\/laravel_split_testing_7.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/02\/laravel_split_testing_7-300x51.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u3053\u3061\u3089\u3082\u3046\u307e\u304f\u4fdd\u5b58\u3055\u308c\u3066\u3044\u307e\u3059\u3002\uff08\u6697\u53f7\u5316\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u4e2d\u8eab\u306f\u5206\u304b\u308a\u307e\u305b\u3093\uff09<\/p>\n<p>\u3067\u306f\u3001\u3053\u306e\u72b6\u614b\u3067\u30ea\u30ed\u30fc\u30c9\u3057\u3066\u540c\u3058\u753b\u50cf\u304c\u8868\u793a\u3055\u308c\u308b\u304b\u3092\u30c1\u30a7\u30c3\u30af\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8695\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/02\/laravel_split_testing_4.png\" alt=\"\" width=\"640\" height=\"258\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/02\/laravel_split_testing_4.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/02\/laravel_split_testing_4-300x121.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u3053\u308c\u3082\u3046\u307e\u304f\u3044\u304d\u307e\u3057\u305f\u2757<\/p>\n<p>\u3067\u306f\u3001\u4eca\u56de\u306f\u30c6\u30b9\u30c8\u3067\u3059\u306e\u3067\u3001\u5148\u307b\u3069\u306e<code>Cookie<\/code>\uff08<code>split_testing_black_friday_sale_2021<\/code>\uff09\u3092\u624b\u52d5\u3067\u524a\u9664\uff06\u30ea\u30ed\u30fc\u30c9\u3057\u3001\u4eca\u5f8c\u306f\u300c<strong>B<\/strong>\u300d\u306e\u753b\u50cf\u3092\u8868\u793a\u3055\u308c\u308b\u304b\u3092\u30c1\u30a7\u30c3\u30af\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-8700\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/02\/laravel_split_testing_8.png\" alt=\"\" width=\"640\" height=\"253\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/02\/laravel_split_testing_8.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/02\/laravel_split_testing_8-300x119.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u306f\u3044\u2757<br \/>\n\u3046\u307e\u304f\u753b\u50cf\u304c\u5207\u308a\u66ff\u308f\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>DB\u306e\u65b9\u3067\u3082\u3001\u4eca\u5ea6\u306f\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c<code>1<\/code>\u306e\u30c7\u30fc\u30bf\u304c\u65b0\u898f\u767b\u9332\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8701\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/02\/laravel_split_testing_9.png\" alt=\"\" width=\"659\" height=\"294\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/02\/laravel_split_testing_9.png 659w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/02\/laravel_split_testing_9-300x134.png 300w\" sizes=\"auto, (max-width: 659px) 100vw, 659px\" \/><\/p>\n<p>\u3067\u306f\u3001\u3053\u306e\u72b6\u614b\u3067\u6b21\u306f\u753b\u50cf\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066<code>accessed<\/code>\u304c<code>1<\/code>\u306b\u5909\u308f\u308b\u304b\u3092\u30c1\u30a7\u30c3\u30af\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<p>\u30da\u30fc\u30b8\u79fb\u52d5\u3059\u308b\u3068\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8702\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/02\/laravel_split_testing_10.png\" alt=\"\" width=\"134\" height=\"45\" \/><\/p>\n<p>\u3067\u306f\u3001DB\u306e\u30c1\u30a7\u30c3\u30af\u3067\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8703\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/02\/laravel_split_testing_11.png\" alt=\"\" width=\"640\" height=\"285\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/02\/laravel_split_testing_11.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/02\/laravel_split_testing_11-300x134.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u306f\u3044\u2757<br \/>\n\u60f3\u5b9a\u3057\u3066\u3044\u305f\u3068\u304a\u308a<code>accessed<\/code>\u304c<code>1<\/code>\uff08<code>true<\/code>\uff09\u306b\u5909\u308f\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u6210\u529f\u3067\u3059\ud83d\ude0a\u2728<\/p>\n<p>\u3042\u3068\u306f\u3001A\u3068B\u304c\u305d\u308c\u305e\u308c\u3069\u308c\u3060\u3051\u30af\u30ea\u30c3\u30af\u3055\u308c\u305f\u304b\u3092\u96c6\u8a08\u3059\u308c\u3070\u3069\u3061\u3089\u304c\u3088\u308a\u6709\u52b9\u306a\u753b\u50cf\uff08\u30b3\u30f3\u30c6\u30f3\u30c4\uff09\u304b\u304c\u5206\u304b\u308a\u307e\u3059\u2757<\/p>\n<h1>\u3061\u306a\u307f\u306b\uff1aAB\u30c6\u30b9\u30c8\u306e\u7cbe\u5ea6\u306b\u3064\u3044\u3066\u306e\u307e\u3068\u3081<\/h1>\n<p>\u79c1\u306f\u3053\u3046\u3044\u3063\u305f\u30de\u30fc\u30b1\u30c3\u30c8\u624b\u6cd5\u306b\u8a73\u3057\u3044\u308f\u3051\u3067\u306f\u306a\u3044\u306e\u3067\u3001\u307e\u305a\u306f\u3058\u3081\u306b\u3044\u308d\u3044\u308d\u3068\u60c5\u5831\u3092AB\u30c6\u30b9\u30c8\u306b\u3064\u3044\u3066\u60c5\u5831\u3092\u96c6\u3081\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u3059\u308b\u3068\u3001<strong>AB\u30c6\u30b9\u30c8\u306f\u6761\u4ef6\u304c\u63c3\u308f\u306a\u3044\u3068\u672c\u5f53\u306b\u4fa1\u5024\u304c\u3042\u308b\u7d50\u679c\u3092\u30b2\u30c3\u30c8\u3067\u304d\u306a\u3044<\/strong>\u3068\u3044\u3046\u610f\u898b\u3082\u3042\u3063\u305f\u306e\u3067\u3001\u81ea\u5206\u306e\u305f\u3081\u306b\u3082\u4ee5\u4e0b\u306b\u307e\u3068\u3081\u3066\u304a\u304d\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u691c\u8a3c\u3063\u3066\u306a\u304b\u306a\u304b\u96e3\u3057\u3044\u3067\u3059\u306d&#8230;\ud83d\ude2d<\/p>\n<h2>\u3068\u306b\u304b\u304f\u30c7\u30fc\u30bf\u6570\u304c\u591a\u304f\u306a\u3044\u3068\u30c0\u30e1<\/h2>\n<p>\u307e\u3060\u30a2\u30af\u30bb\u30b9\u304c\u5c11\u306a\u3044\u30b5\u30a4\u30c8\u3067\u3084\u3063\u3066\u3082\u7d50\u679c\u304c\u304b\u305f\u3088\u3063\u3066\u3057\u307e\u3046\u306e\u3067\u3001\u9006\u306b\u3084\u3089\u306a\u3044\u307b\u3046\u304c\u3044\u3044\u3068\u3044\u3046\u5834\u5408\u3082\u3042\u308a\u307e\u3059\u3002<\/p>\n<h2>\u7d99\u7d9a\u3057\u3066\u3084\u3089\u306a\u3044\u3068\u30c0\u30e1<\/h2>\n<p>\u3042\u308b\u7a0b\u5ea6\u304d\u3061\u3093\u3068AB\u30c6\u30b9\u30c8\u3092\u3057\u3066\u3082\u3001\u6642\u4ee3\u306e\u6d41\u308c\u306f\u5e38\u306b\u5909\u308f\u3063\u3066\u3044\u308b\u306e\u3067\u3001\u7d99\u7d9a\u3057\u3066\u5909\u66f4\u3092\u7d9a\u3051\u3066\u3044\u304b\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u3067\u3059\u3002<\/p>\n<p>\u3055\u3089\u306b\u3001\u9811\u5f35\u3063\u3066\u30b2\u30c3\u30c8\u3057\u305f\u7d50\u679c\u3092\u4f7f\u3063\u3066\u4f55\u304b\u3092\u5909\u66f4\u3059\u308b\u3068\u3001\u305d\u308c\u306b\u3088\u3063\u3066\u307e\u305f\u30e6\u30fc\u30b6\u30fc\u304c\u9055\u3063\u305f\u884c\u52d5\u3092\u3068\u308b\u53ef\u80fd\u6027\u3082\u51fa\u3066\u304d\u307e\u3059\u3002<\/p>\n<h2>\u5927\u304d\u304f\u5909\u3048\u3059\u304e\u308b\u3068\u30c0\u30e1<\/h2>\n<p>\u3053\u308c\u3082\u7d99\u7d9a\u3068\u4f3c\u3066\u3044\u307e\u3059\u304c\u3001\u6bce\u56de\u5168\u304f\u9055\u3046\uff12\u3064\u306e\u3082\u306e\u3067\u30c6\u30b9\u30c8\u3059\u308b\u3068\u3044\u3046\u3088\u308a\u306f\u3001\u30da\u30fc\u30b8\u306e\u4e2d\u3067\u300c\u826f\u3051\u308c\u3070\u6b8b\u3059\u3001\u60aa\u3051\u308c\u3070\u6368\u3066\u308b\u300d\u3092\u7d9a\u3051\u3066\u3044\u304d\u3001\u5c11\u3057\u305a\u3064\u3088\u308a\u3088\u3044\u7d50\u679c\u3092\u63a1\u7528\u3057\u3066\u3044\u304b\u306a\u3044\u3068\u610f\u5473\u304c\u306a\u3044\u3002\uff08\u305f\u3060\u3001\u72b6\u6cc1\u306b\u3088\u3063\u3066\u306f\u5927\u304d\u304f\u5909\u3048\u306a\u304b\u304d\u3083\u3044\u3051\u306a\u3044\u3068\u304d\u3082\u3042\u308b\u3068\u601d\u3046\u306e\u3067\u3001\u30d0\u30e9\u30f3\u30b9\u304c\u96e3\u3057\u3044\u304b\u3082\u3067\u3059\u306d\ud83d\ude2b\uff09<\/p>\n<h2>\u540c\u3058\u30da\u30fc\u30b8\u3067\u4e00\u5ea6\u306b\u5225\u306e\uff12\u3064\u4ee5\u4e0a\u306eAB\u30c6\u30b9\u30c8\u3092\u3057\u3061\u3083\u30c0\u30e1<\/h2>\n<p>\u4f8b\u3048\u3070\u3001\u6b21\u306e\uff12\u30da\u30a2\u3067\u30c6\u30b9\u30c8\u3092\u5b9f\u65bd\u3057\u305f\u3068\u3057\u307e\u3059\u3002<\/p>\n<ul>\n<li>A \u2194 B \u3067\u5207\u308a\u66ff\u3048\uff1a \u30da\u30a2\uff11<\/li>\n<li>C \u2194 D \u3067\u5207\u308a\u66ff\u3048\uff1a \u30da\u30a2\uff12<\/li>\n<\/ul>\n<p>\u3059\u308b\u3068\u300c\u30da\u30a2\uff11\u300d\u306e\u7d50\u679c\u306f\u3001\u30da\u30a2\uff12\u306e\u5909\u5316\u304b\u3089\u3082\u5f71\u97ff\u3092\u53d7\u3051\u308b\u306e\u3067\u3001\u3053\u3046\u3044\u3063\u305f\u5834\u5408\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5168\u3066\u306e\u7d44\u307f\u5408\u308f\u305b\u3092\u4f5c\u3063\u3066\u30c6\u30b9\u30c8\u3057\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u3067\u3059\u3002<\/p>\n<ul>\n<li>A \uff06 C<\/li>\n<li>A \uff06 D<\/li>\n<li>B \uff06 C<\/li>\n<li>B \uff06 D<\/li>\n<\/ul>\n<p>\u3053\u3046\u306a\u308b\u3068\u3001\u6570\u304c\u591a\u304f\u306a\u308a\u3059\u304e\u3066\u3057\u307e\u3046\u306e\u3067\u540c\u3058\u30da\u30fc\u30b8\u3067\u306f\u4e00\u7b87\u6240\u3060\u3051\u306e\u65b9\u304c\u3044\u3044\u306e\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u306d\u3002<\/p>\n<h1>\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b<\/h1>\n<p>\u4eca\u56de\u5b9f\u969b\u306b\u958b\u767a\u3057\u305f\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u4e00\u5f0f\u3092\u4ee5\u4e0b\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<a  data-e-Disable-Page-Transition=\"true\" class=\"download-link\" title=\"\" href=\"https:\/\/blog.capilano-fw.com?download=8706&amp;tmstv=1777537065\" rel=\"nofollow\" id=\"download-link-8706\" data-redirect=\"false\" >\n\t\u3010Laravel\u3011AB\u30c6\u30b9\u30c8\u6a5f\u80fd\u3092\u3064\u304f\u308b<\/a>\n\n<p>\u203b \u305f\u3060\u3057\u3001\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u7b49\u306f\u3054\u81ea\u8eab\u3067\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h1>\u304a\u308f\u308a\u306b<\/h1>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u4eca\u56de\u306f<code>Laravel<\/code>\u3067AB\u30c6\u30b9\u30c8\u3092\u5b9f\u88c5\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p>\u6b63\u76f4\u306a\u3068\u3053\u308d\u691c\u8a3c\u3084\u5206\u6790\u306f\u305d\u308c\u307b\u3069\u8a73\u3057\u3044\u308f\u3051\u3067\u306f\u306a\u3044\u3067\u3059\u304c\u3001\u4eca\u5f8c\u306e\u5c55\u671b\u3068\u3057\u3066\u300c\u7d4c\u55b6\u8005\u7684\u306a\u8996\u70b9\u300d\u3067\u898b\u3066\u5fc5\u8981\u3068\u306a\u308b\u6a5f\u80fd\u3084\u30b3\u30f3\u30c6\u30f3\u30c4\u3082\u3054\u7d39\u4ecb\u3067\u304d\u308c\u3070\u3044\u3044\u306a\u3068\u8003\u3048\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u306a\u304a\u3001\u5b9f\u306f\u4eca\u56de\u306e\u8a18\u4e8b\u306f\u300c\u30d0\u30fc\u30b8\u30e7\u30f3\uff12\u300d\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3068\u3044\u3046\u306e\u3082\u3001\u5f53\u521d\u306f\u300c<strong>\u3042\u308b\u5546\u54c1\u306e\u753b\u50cf\uff08\u8907\u6570\uff09\u306e\u4e2d\u304b\u3089\u4eba\u6c17\u304c\u3042\u308b\u753b\u50cf\u3092\u62bd\u51fa\u3059\u308b<\/strong>\u300d\u3068\u3044\u3046\u3088\u3046\u306a\u8a18\u4e8b\u3092\u66f8\u304d\u306f\u3058\u3081\u3066\u3044\u305f\u306e\u3067\u3059\u304c\u3001\u9014\u4e2d\u3067\u300c\u3044\u3084\u3001\u3053\u308c\u8907\u96d1\u3059\u304e\u3066\u8a18\u4e8b\u3068\u3057\u3066\u306f\u4e0d\u9069\u5207\u3060\u308d&#8230;\ud83d\udca6\u300d\u3068\u306a\u308a\u3001\u6700\u521d\u304b\u3089\u3084\u308a\u76f4\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3084\u306f\u308a\u30af\u30ea\u30a8\u30fc\u30bf\u30fc\u3068\u3057\u3066\u306f\u300c\u304a\u8535\u5165\u308a\u300d\u306b\u306a\u308b\u3068\u7d50\u69cb\u60b2\u3057\u3044\u3082\u306e\u304c\u3042\u308b\u306e\u3067\u3001\u306a\u3093\u3068\u304b\u518d\u69cb\u6210\u3057\u3066\u8a18\u4e8b\u3092\u66f8\u3044\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p>\u305c\u3072\u559c\u3093\u3067\u3044\u305f\u3060\u3051\u308b\u3068\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-3467 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/04\/no_9.png\" alt=\"\" width=\"216\" height=\"320\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/04\/no_9.png 216w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/04\/no_9-203x300.png 203w\" sizes=\"auto, (max-width: 216px) 100vw, 216px\" \/>\u300c\u75db\u307f\u6b62\u3081\u306e\u304a\u85ac\u3063\u3066<br \/>\n\u7720\u304f\u306a\u308b\u3093\u3067\u3059\u306d&#8230;\ud83d\udca6\u300d<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u30d7\u30ed\u30b0\u30e9\u30de\u30fc\u306b\u9650\u3089\u305a\u3067\u3059\u304c\u3001\u591a\u304f\u306e\u4eba\u306f\u30b9\u30ad\u30eb\u30a2\u30c3\u30d7\u3084\u30ad\u30e3\u30ea\u30a2\u30a2\u30c3\u30d7\u304c\u982d\u306e\u4e2d\u306b\u3042\u3063\u305f\u308a\u3059\u308b\u3093\u3058\u3083\u306a\u3044\u3067\u3057\u3087\u3046\u304b\u3002 \u304b\u304f\u3044\u3046\u79c1\u3082\u3001\u3088\u308a\u300c\u81ea\u5206\u306e\u4fa1\u5024\u300d\u3092\u9ad8\u304f &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.capilano-fw.com\/?p=8659\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;\u3010Laravel\u3011AB\u30c6\u30b9\u30c8\u6a5f\u80fd\u3092\u3064\u304f\u308b&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":8711,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[231,230],"class_list":["post-8659","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-laravel","tag-231","tag-230"],"_links":{"self":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/8659","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=8659"}],"version-history":[{"count":18,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/8659\/revisions"}],"predecessor-version":[{"id":8712,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/8659\/revisions\/8712"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/media\/8711"}],"wp:attachment":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8659"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8659"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8659"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}