{"id":3969,"date":"2019-06-27T05:47:46","date_gmt":"2019-06-26T20:47:46","guid":{"rendered":"https:\/\/blog.capilano-fw.com\/?p=3969"},"modified":"2022-07-12T19:03:27","modified_gmt":"2022-07-12T10:03:27","slug":"%e3%80%90laravel-javascript%e3%80%91qr%e3%82%b3%e3%83%bc%e3%83%89%e3%81%a7%e8%87%aa%e5%8b%95%e3%83%ad%e3%82%b0%e3%82%a4%e3%83%b3%e3%81%99%e3%82%8b%e6%a9%9f%e8%83%bd%e3%82%92%e3%81%a4%e3%81%8f","status":"publish","type":"post","link":"https:\/\/blog.capilano-fw.com\/?p=3969","title":{"rendered":"\u3010Laravel + JavaScript\u3011QR\u30b3\u30fc\u30c9\u3067\u81ea\u52d5\u30ed\u30b0\u30a4\u30f3\u3059\u308b\u6a5f\u80fd\u3092\u3064\u304f\u308b\uff08\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u53ef\uff09"},"content":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u5b09\u3057\u3044\u3053\u3068\u306b\u3053\u306e\u30d6\u30ed\u30b0\u3092\u59cb\u3081\u3066\u304b\u3089\u3054\u9023\u7d61\u3092\u3044\u305f\u3060\u3044\u305f\u8a2a\u554f\u30e6\u30fc\u30b6\u30fc\u69d8\u3068\u76f4\u63a5\u304a\u8a71\u3092\u3055\u305b\u3066\u3044\u305f\u3060\u304f\u3053\u3068\u3082\u5897\u3048\u3066\u304d\u305f\u306e\u3067\u3059\u304c\u3001\u3084\u306f\u308a\u305d\u3046\u3044\u3063\u305f\u5834\u5408\u306b\u306f\u300c\u305d\u3046\u304b\u3001\u3058\u3083\u3042\u3053\u3093\u306a\u3053\u3068\u3082\u3067\u304d\u308b\u304b\u3082\uff01\u300d\u3068\u3044\u3046\u65b0\u3057\u3044\u30a2\u30a4\u30c7\u30a2\u306b\u6c17\u3065\u304b\u305b\u3066\u3082\u3089\u3046\u3053\u3068\u3042\u3063\u305f\u308a\u3057\u307e\u3059\u3002<\/p>\n<p>\u305d\u3057\u3066\u3001\u4eca\u56de\u306e\u8a71\u984c\u306e\u51fa\u767a\u70b9\u306b\u306a\u3063\u305f\u306e\u304c\u3001<a href=\"https:\/\/blog.capilano-fw.com\/?p=2192\">Laravel + JS\u3067\u30d0\u30fc\u30b3\u30fc\u30c9\u3092\u8aad\u307f\u53d6\u308b\uff08\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u53ef\uff09<\/a>\u3068\u3044\u3046\u8a18\u4e8b\u306a\u3093\u3067\u3059\u304c\u3001\u3053\u308c\u306f\u5546\u54c1\u306b\u306f\u5fc5\u305a\u3068\u3044\u3063\u3066\u3044\u3044\u307b\u3069\u3064\u3044\u3066\u3044\u308b\u300c\u30d0\u30fc\u30b3\u30fc\u30c9\u300d\u3092JavaScript\u3067\u8aad\u307f\u53d6\u308b\u3068\u3044\u3046\u5185\u5bb9\u306b\u306a\u3063\u3066\u307e\u3059\u3002<\/p>\n<p>\u305f\u3060\u3001\u30b9\u30de\u30fc\u30c8\u30d5\u30a9\u30f3\u304c\u666e\u53ca\u3057\u3060\u3057\u305f\u3053\u308d\u304b\u3089\u3082\u3046\uff11\u3064\u5b58\u5728\u611f\u3092\u51fa\u3057\u3066\u304d\u305f\u300c\u8aad\u307f\u53d6\u308a\u30b3\u30fc\u30c9\u300d\u304c\u3042\u308a\u307e\u3059\u3088\u306d\u3002<\/p>\n<p>\u305d\u3046\u3067\u3059\u3002<\/p>\n<p><strong style=\"font-size: 35px;\">QR\u30b3\u30fc\u30c9<\/strong><\/p>\n<p>\u3067\u3059\u306d\u3002<\/p>\n<p>\u203b \u2193\u2193\u2193\u3053\u3046\u3044\u3046\u3084\u3064\u3067\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3970\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/06\/QR_Code1561566089.png\" alt=\"\" width=\"132\" height=\"132\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/06\/QR_Code1561566089.png 132w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/06\/QR_Code1561566089-100x100.png 100w\" sizes=\"auto, (max-width: 132px) 100vw, 132px\" \/><\/p>\n<p>QR\u30b3\u30fc\u30c9\u306f\u7e26\u3068\u6a2a\u65b9\u5411\u306b\u60c5\u5831\u3092\u3082\u305f\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u306e\u3067\u3001\u60c5\u5831\u91cf\u304c\u30d0\u30fc\u30b3\u30fc\u30c9\u3088\u308a\u591a\u304f\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3001\u3044\u308f\u3070\u300c\u767a\u5c55\u7cfb\u30d0\u30fc\u30b3\u30fc\u30c9\u300d\u3067\u3059\u304c\u3001\u4eca\u56de\u306f\u3053\u306e<strong>QR\u30b3\u30fc\u30c9\u3092\u8aad\u307f\u53d6\u308b\u3053\u3068\u3067\u81ea\u52d5\u30ed\u30b0\u30a4\u30f3\u304c\u3067\u304d\u305f\u3089\u9762\u767d\u3044<\/strong>\u306a\u3068\u601d\u3044\u30b5\u30f3\u30d7\u30eb\u3092\u4f5c\u3063\u3066\u307f\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\uff08\u4f8b\u3048\u3070\u3001\u793e\u54e1\u3055\u3093\u304cQR\u30b3\u30fc\u30c9\u3092\u914d\u5e03\u3055\u308c\u3066\u3044\u3066PC\u3084\u30b9\u30de\u30db\u306e\u30ab\u30e1\u30e9\u306b\u898b\u305b\u308b\u3060\u3051\u3067\u30ed\u30b0\u30a4\u30f3\u3067\u304d\u308b\u3088\u3046\u306a\u30b7\u30b9\u30c6\u30e0\u3092\u60f3\u5b9a\u3057\u3066\u3044\u307e\u3059\uff09<\/p>\n<p>\u305c\u3072\u7686\u3055\u3093\u306e\u304a\u5f79\u306b\u7acb\u3066\u308b\u3068\u5b09\u3057\u3044\u3067\u3059\ud83d\ude0a\u2728<br \/>\n\u6700\u5f8c\u306b\u4eca\u56de\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u4e00\u5f0f\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><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\" \/><\/p>\n<p><strong>\u958b\u767a\u74b0\u5883\uff1a<\/strong> Laravel 5.8\u3001Vue 2.6\u3001Google Chrome 75<\/p>\n<h1>\u524d\u63d0\u3068\u3057\u3066<\/h1>\n<p>\u3053\u306e\u8a18\u4e8b\u306e\u524d\u63d0\u3068\u3057\u3066\u3001Laravel\u306e\u30ed\u30b0\u30a4\u30f3\u6a5f\u80fd\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6e08\u307f\u3067\u3042\u308b\u3082\u306e\u3068\u3057\u307e\u3059\u3002\u3082\u3057\u307e\u3060\u306e\u65b9\u306f\u4ee5\u4e0b\u306e\u8a18\u4e8b\u3092\u53c2\u8003\u306b\u3057\u3066\u6e96\u5099\u3057\u3066\u304a\u3044\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><a href=\"https:\/\/blog.capilano-fw.com\/?p=289\">\u3010Laravel5.6\u3011\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u76f4\u5f8c\u306b\u3084\u308b\u3053\u3068\uff13\u70b9<\/a><\/p>\n<p><strong>\u203b \u6ce8\u610f\uff1a<\/strong>Google Chrome\u3067\u30c6\u30b9\u30c8\u3059\u308b\u5834\u5408\u3001\u30ed\u30fc\u30ab\u30eb\u3067\u3042\u3063\u3066\u3082\u30a6\u30a7\u30d6\u30ab\u30e1\u30e9\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u306b\u306fHTTPS\u74b0\u5883\u3067\u3042\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3082\u3057\u307e\u3060HTTPS\u3092\u5c0e\u5165\u3057\u3066\u3044\u306a\u3044\u65b9\u306f\u4ee5\u4e0b\u3092\u53c2\u8003\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><a href=\"https:\/\/blog.capilano-fw.com\/?p=2228\">\u30b3\u30d4\u30da\u3067OK\uff01\u30ed\u30fc\u30ab\u30eb\u74b0\u5883\u306bHTTPS\u3092\u5c0e\u5165\u3059\u308b\uff08nginx\u7de8\uff09<\/a><\/p>\n<h1>\u81ea\u52d5\u30ed\u30b0\u30a4\u30f3\u306e\u624b\u9806<\/h1>\n<p>\u4eca\u56de\u3001\u81ea\u52d5\u30ed\u30b0\u30a4\u30f3\u3092\u5b9f\u73fe\u3059\u308b\u624b\u9806\u306f\u6b21\u306e\u3068\u304a\u308a\u306b\u306a\u3063\u3066\u307e\u3059\u3002<\/p>\n<ol>\n<li>JavaScript\u3067QR\u30b3\u30fc\u30c9\u3092\u8aad\u307f\u53d6\u308b<\/li>\n<li>\u8aad\u307f\u53d6\u3063\u305f\u30c7\u30fc\u30bf\uff08UUID\uff09\u3092\u6301\u3063\u305f\u30e6\u30fc\u30b6\u30fc\u3092\u63a2\u3059<\/li>\n<li>\u898b\u3064\u304b\u308c\u3070\u30ed\u30b0\u30a4\u30f3\u3059\u308b<\/li>\n<\/ol>\n<p>\u3053\u3046\u3059\u308b\u3053\u3068\u3067\u3081\u3093\u3069\u3046\u306a\u30ed\u30b0\u30a4\u30f3\u30d5\u30a9\u30fc\u30e0\u3078\u306e\u5165\u529b\u3092\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u3067\u304d\u307e\u3059\u3057\u3001\u6708\u4e00\u56de\u5f37\u5236\u7684\u306bUUID\uff08\u4ed6\u3068\u304b\u3076\u3089\u306a\u3044ID\u756a\u53f7\uff09\u3092\u5909\u66f4\u3057\u3066QR\u30b3\u30fc\u30c9\u3092\u65b0\u3057\u304f\u767a\u884c\u3059\u308b\u3088\u3046\u306b\u3059\u308c\u3070\u3001\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u3082\u5411\u4e0a\u3059\u308b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<h1>DB\u5185\u306e\u6e96\u5099<\/h1>\n<h2>users\u30c6\u30fc\u30d6\u30eb\u306bUUID\u3092\u4fdd\u5b58\u3059\u308b\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u8ffd\u52a0\u3059\u308b<\/h2>\n<p>\u3067\u306f\u3001QR\u30b3\u30fc\u30c9\u3067\u8aad\u307f\u53d6\u308b\u6587\u5b57\u5217\uff08UUID\uff09\u3092\u4fdd\u5b58\u3057\u3066\u304a\u304f\u30d5\u30a3\u30fc\u30eb\u30c9\u3092<code>users<\/code>\u30c6\u30fc\u30d6\u30eb\u306b\u8ffd\u52a0\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<pre><strong>php artisan make:migration add_uuid_to_users_table<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u3001<code>database\/migrations\/****_**_**_******_add_uuid_to_users_table.php<\/code>\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c\u307e\u3059\u306e\u3067\u3001\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u3044\u3066\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n<pre>&lt;?php\r\n\r\nuse Illuminate\\Support\\Facades\\Schema;\r\nuse Illuminate\\Database\\Schema\\Blueprint;\r\nuse Illuminate\\Database\\Migrations\\Migration;\r\n\r\nclass AddUuidToUsersTable extends Migration\r\n{\r\n    <strong>public function up()<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        Schema::table('users', function (Blueprint $table) {<\/strong>\r\n<strong>            $table-&gt;string('uuid')<\/strong>\r\n<strong>                -&gt;nullable()<\/strong>\r\n<strong>                -&gt;after('remember_token');<\/strong>\r\n<strong>        });<\/strong>\r\n<strong>    }<\/strong>\r\n\r\n<strong>    public function down()<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        Schema::table('users', function (Blueprint $table) {<\/strong>\r\n<strong>            $table-&gt;dropColumn('uuid');<\/strong>\r\n<strong>        });<\/strong>\r\n<strong>    }<\/strong>\r\n}<\/pre>\n<p>\u5909\u66f4\u3057\u305f\u3089\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u3092\u5b9f\u884c\u3002<\/p>\n<pre><strong>php artisan migrate<\/strong><\/pre>\n<p>\u5b9f\u884c\u3059\u308b\u3068\u30c6\u30fc\u30d6\u30eb\u306f\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3971\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/06\/qr_login_1.png\" alt=\"\" width=\"357\" height=\"336\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/06\/qr_login_1.png 357w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/06\/qr_login_1-300x282.png 300w\" sizes=\"auto, (max-width: 357px) 100vw, 357px\" \/><\/p>\n<h2>\u30c6\u30b9\u30c8\u30e6\u30fc\u30b6\u30fc\u3092\u4f5c\u6210\u3059\u308b<\/h2>\n<p>\u5f8c\u3067\u5b9f\u969b\u306b\u30ed\u30b0\u30a4\u30f3\u306e\u30c6\u30b9\u30c8\u3092\u3057\u307e\u3059\u306e\u3067<code>Seeder<\/code>\u3092\u4f7f\u3063\u3066\u30c6\u30b9\u30c8\u30c7\u30fc\u30bf\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\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 UsersTableSeeder<\/strong><\/pre>\n<p><code>database\/seeds\/UsersTableSeeder.php<\/code>\u304c\u4f5c\u6210\u3055\u308c\u308b\u306e\u3067\u3001<code>run()<\/code>\u5185\u306b\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<pre>public function run()\r\n{\r\n    <strong>$names = [<\/strong>\r\n<strong>        'taro' =&gt; '\u592a\u90ce',<\/strong>\r\n<strong>        'jiro' =&gt; '\u6b21\u90ce',<\/strong>\r\n<strong>        'saburo' =&gt; '\u4e09\u90ce',<\/strong>\r\n<strong>        'shiro' =&gt; '\u56db\u90ce',<\/strong>\r\n<strong>        'goro' =&gt; '\u4e94\u90ce',<\/strong>\r\n<strong>        'rokuro' =&gt; '\u516d\u90ce',<\/strong>\r\n<strong>        'shichiro' =&gt; '\u4e03\u90ce',<\/strong>\r\n<strong>        'hachiro' =&gt; '\u516b\u90ce',<\/strong>\r\n<strong>        'kuro' =&gt; '\u4e5d\u90ce'<\/strong>\r\n<strong>    ];<\/strong>\r\n\r\n<strong>    foreach ($names as $name_en =&gt; $name_jp) {<\/strong>\r\n\r\n<strong>        \\App\\User::create([<\/strong>\r\n<strong>            'name' =&gt; $name_jp,<\/strong>\r\n<strong>            'email' =&gt; $name_en .'@example.com',<\/strong>\r\n<strong>            'password' =&gt; bcrypt('xxxxxxxx'),<\/strong>\r\n<strong>            'uuid' =&gt; (string) \\Str::uuid()  \/\/ \u3053\u3053\u304cUUID<\/strong>\r\n<strong>        ]);<\/strong>\r\n\r\n<strong>    }<\/strong>\r\n}<\/pre>\n<p>\u5909\u66f4\u3057\u305f\u3089<code>UsersTableSeeder<\/code>\u304c\u6709\u52b9\u306b\u306a\u308b\u3088\u3046\u306b<code>database\/seeds\/DatabaseSeeder.php<\/code>\u306e<code>run()<\/code>\u5185\u306b\u767b\u9332\u3057\u307e\u3059\u3002\uff08\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3092\u5916\u3059\u3060\u3051\u3067OK\u3067\u3059\uff09<\/p>\n<pre>public function run()\r\n{\r\n     <strong>$this-&gt;call(UsersTableSeeder::class);<\/strong>\r\n}<\/pre>\n<p>\u3067\u306f<code>Seeder<\/code>\u3067\u30c6\u30b9\u30c8\u30e6\u30fc\u30b6\u30fc\u3092\u767b\u9332\u3057\u307e\u3057\u3087\u3046\u3002\uff08\u4eca\u56de\u306f\u30c6\u30fc\u30d6\u30eb\u3092\u524a\u9664\u3057\u3066\u4e00\u6c17\u306b\u5b9f\u884c\u3057\u307e\u3059\uff09<\/p>\n<pre><strong>php artisan migrate:fresh --seed<\/strong><\/pre>\n<p>\u5b9f\u884c\u304c\u5b8c\u4e86\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b<code>users<\/code>\u30c6\u30fc\u30d6\u30eb\u306e\u5404\u30e6\u30fc\u30b6\u30fc\u306b<code>UUID<\/code>\u304c\u767b\u9332\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3972\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/06\/qr_login_2.png\" alt=\"\" width=\"257\" height=\"241\" \/><\/p>\n<h1>\u81ea\u52d5\u30ed\u30b0\u30a4\u30f3\u6a5f\u80fd\u3092\u3064\u304f\u308b<\/h1>\n<p>\u3067\u306f\u3053\u3053\u304b\u3089\u304c\u5b9f\u969b\u306b\u30b3\u30fc\u30c9\u3092\u66f8\u3044\u3066\u3044\u304f\u4f5c\u696d\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2>QR\u30b3\u30fc\u30c9\u3092\u8aad\u307f\u53d6\u308b\u90e8\u5206\u3092\u3064\u304f\u308b<\/h2>\n<p>\u30ed\u30b0\u30a4\u30f3\u30d5\u30a9\u30fc\u30e0\u306e\u4ee3\u308f\u308a\u3068\u3057\u3066\u3001QR\u30b3\u30fc\u30c9\u3092\u8aad\u307f\u53d6\u308b\u30da\u30fc\u30b8\u3092\u3064\u304f\u3063\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<h3>\u30eb\u30fc\u30c8\u3092\u3064\u304f\u308b<\/h3>\n<p>\u306f\u3058\u3081\u306b<code>route\/web.php<\/code>\u306b\u30eb\u30fc\u30c8\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<pre><strong>Route::get('auth\/qr_login', 'Auth\\\\QrLoginController@showQrReader');   \/\/ \u30ed\u30b0\u30a4\u30f3\u30d5\u30a9\u30fc\u30e0<\/strong>\r\n<strong>Route::post('auth\/qr_login', 'Auth\\\\QrLoginController@login');          \/\/ Ajax\u901a\u4fe1<\/strong><\/pre>\n<h3>\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3092\u3064\u304f\u308b<\/h3>\n<p>\u7d9a\u3044\u3066\u3001\u30eb\u30fc\u30c8\u3067\u6307\u5b9a\u3057\u305f\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3092\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<pre><strong>php artisan make:controller Auth\\\\QrLoginController<\/strong><\/pre>\n<p><code>app\/Http\/Controllers\/Auth\/QrLoginController.php<\/code>\u304c\u4f5c\u6210\u3055\u308c\u308b\u306e\u3067\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u30e1\u30bd\u30c3\u30c9\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<pre>&lt;?php\r\n\r\nnamespace App\\Http\\Controllers\\Auth;\r\n\r\nuse Illuminate\\Http\\Request;\r\nuse App\\Http\\Controllers\\Controller;\r\n\r\nclass QrLoginController extends Controller\r\n{\r\n    <strong>public function showQrReader() {<\/strong>\r\n\r\n<strong>        return view('auth.qr_login');   \/\/ \u30ed\u30b0\u30a4\u30f3\u30d5\u30a9\u30fc\u30e0\u306e\u4ee3\u308f\u308a<\/strong>\r\n\r\n<strong>    }<\/strong>\r\n}<\/pre>\n<h3>\u30d3\u30e5\u30fc\u3092\u3064\u304f\u308b<\/h3>\n<p>\u3067\u306f\u3001\u30d3\u30e5\u30fc\u304c\u307e\u3060\u306a\u3044\u306e\u3067<code>resources\/views\/auth\/qr_login.blade.php<\/code>\u306b\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3001\u4e2d\u8eab\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3057\u3066\u4fdd\u5b58\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre>&lt;html&gt;\r\n&lt;head&gt;\r\n    &lt;style&gt;\r\n\r\n        canvas {\r\n            padding-left: 0;\r\n            padding-right: 0;\r\n            margin-left: auto;\r\n            margin-right: auto;\r\n            display: block;\r\n            width: 50%;\r\n        }\r\n\r\n    &lt;\/style&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;div id=\"app\"&gt;\r\n    &lt;div style=\"text-align:center;font-size:35px;\"&gt;QR\u30b3\u30fc\u30c9\u3092\u8aad\u307f\u3068\u3063\u3066\u81ea\u52d5\u30ed\u30b0\u30a4\u30f3\u3067\u304d\u307e\u3059&lt;\/div&gt;\r\n    &lt;br&gt;\r\n    &lt;canvas ref=\"canvas\"&gt;&lt;\/canvas&gt;\r\n&lt;\/div&gt;\r\n&lt;script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/axios\/0.19.0\/axios.min.js\"&gt;&lt;\/script&gt;\r\n&lt;script src=\"https:\/\/cdn.jsdelivr.net\/npm\/vue@2.6.10\/dist\/vue.min.js\"&gt;&lt;\/script&gt;\r\n&lt;script src=\"https:\/\/cdn.jsdelivr.net\/npm\/jsqr@1.4.0\/dist\/jsQR.min.js\"&gt;&lt;\/script&gt;\r\n&lt;script&gt;\r\n\r\n    <strong>new Vue({<\/strong>\r\n<strong>        el: '#app',<\/strong>\r\n<strong>        data: {<\/strong>\r\n<strong>            video: null,<\/strong>\r\n<strong>            canvas: null,<\/strong>\r\n<strong>            context: null,<\/strong>\r\n<strong>            uuid: '',<\/strong>\r\n<strong>            completed: false,<\/strong>\r\n<strong>            componentWidth: -1,<\/strong>\r\n<strong>        },<\/strong>\r\n<strong>        computed: {<\/strong>\r\n<strong>            hasUuid() {<\/strong>\r\n\r\n<strong>                return (this.uuid !== '');<\/strong>\r\n\r\n<strong>            }<\/strong>\r\n<strong>        },<\/strong>\r\n<strong>        methods: {<\/strong>\r\n<strong>            renderFrame() {<\/strong>\r\n\r\n<strong>                if(!this.hasUuid &amp;&amp; !this.completed) { \/\/ \u307e\u3060QR\u30b3\u30fc\u30c9\u304c\u8aad\u307f\u8fbc\u307e\u308c\u3066\u3044\u306a\u3044\u5834\u5408<\/strong>\r\n\r\n<strong>                    const video = this.video;<\/strong>\r\n<strong>                    const canvas = this.canvas;<\/strong>\r\n<strong>                    const context = this.context;<\/strong>\r\n\r\n<strong>                    if(video.readyState === video.HAVE_ENOUGH_DATA) {<\/strong>\r\n\r\n<strong>                        context.drawImage(video, 0, 0, canvas.width, canvas.height);<\/strong>\r\n<strong>                        const imageData = context.getImageData(0, 0, canvas.width, canvas.height);<\/strong>\r\n<strong>                        const code = jsQR(imageData.data, imageData.width, imageData.height);<\/strong>\r\n\r\n<strong>                        if(code) {<\/strong>\r\n\r\n<strong>                            this.uuid = code.data;<\/strong>\r\n<strong>                            axios.post('\/auth\/qr_login', { uuid: this.uuid })<\/strong>\r\n<strong>                                .then((response) =&gt; {<\/strong>\r\n\r\n<strong>                                    const result = response.data.result;<\/strong>\r\n<strong>                                    const user = response.data.user;<\/strong>\r\n\r\n<strong>                                    if(result) {<\/strong>\r\n\r\n<strong>                                        this.completed = true;<\/strong>\r\n<strong>                                        alert('\u300c'+ user.name +'\u300d\u3055\u3093\u3001\u304a\u306f\u3088\u3046\u3054\u3056\u3044\u307e\u3059\uff01');<\/strong>\r\n<strong>                                        \/\/ location.href = '\/user'; \/\/ \u3053\u3053\u3067\u30ea\u30c0\u30a4\u30ec\u30af\u30c8<\/strong>\r\n\r\n<strong>                                    } else {<\/strong>\r\n\r\n<strong>                                        console.log('\u30ed\u30b0\u30a4\u30f3\u5931\u6557..');<\/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>                                    console.log(error);<\/strong>\r\n\r\n<strong>                                })<\/strong>\r\n<strong>                                .finally(() =&gt; {<\/strong>\r\n\r\n<strong>                                    this.uuid = '';<\/strong>\r\n\r\n<strong>                                });<\/strong>\r\n\r\n<strong>                        }<\/strong>\r\n\r\n<strong>                    }<\/strong>\r\n\r\n<strong>                }<\/strong>\r\n\r\n<strong>                requestAnimationFrame(this.renderFrame);<\/strong>\r\n\r\n<strong>            },<\/strong>\r\n<strong>            initializeVideo(videoParams) {<\/strong>\r\n\r\n<strong>                return navigator.mediaDevices.getUserMedia(videoParams)<\/strong>\r\n\r\n<strong>            },<\/strong>\r\n<strong>            initializeVideoThen(stream) {<\/strong>\r\n\r\n<strong>                this.video.srcObject = stream;<\/strong>\r\n<strong>                this.video.play();<\/strong>\r\n\r\n<strong>            }<\/strong>\r\n<strong>        },<\/strong>\r\n<strong>        mounted() {<\/strong>\r\n\r\n<strong>            this.video = document.createElement('video');<\/strong>\r\n<strong>            this.video.addEventListener('loadedmetadata', () =&gt; {<\/strong>\r\n\r\n<strong>                this.canvas.width = this.componentWidth;<\/strong>\r\n<strong>                this.canvas.height = Number(this.canvas.width * this.video.videoHeight \/ this.video.videoWidth);<\/strong>\r\n<strong>                this.renderFrame();<\/strong>\r\n\r\n<strong>            });<\/strong>\r\n<strong>            this.video.setAttribute('autoplay', '');<\/strong>\r\n<strong>            this.video.setAttribute('muted', '');<\/strong>\r\n<strong>            this.video.setAttribute('playsinline', '');<\/strong>\r\n<strong>            this.canvas = this.$refs.canvas;<\/strong>\r\n<strong>            this.context = this.canvas.getContext('2d');<\/strong>\r\n<strong>            this.componentWidth = this.canvas.offsetWidth;<\/strong>\r\n\r\n<strong>            const videoParams = {<\/strong>\r\n<strong>                audio: false,<\/strong>\r\n<strong>                video: {<\/strong>\r\n<strong>                    facingMode: {<\/strong>\r\n<strong>                        exact: 'environment'<\/strong>\r\n<strong>                    },<\/strong>\r\n<strong>                    width: { ideal: 1080 },<\/strong>\r\n<strong>                    height: { ideal: 720 }<\/strong>\r\n<strong>                }<\/strong>\r\n<strong>            };<\/strong>\r\n\r\n<strong>            this.initializeVideo(videoParams)<\/strong>\r\n<strong>                .then(this.initializeVideoThen)<\/strong>\r\n<strong>                .catch(() =&gt; {<\/strong>\r\n\r\n<strong>                    this.initializeVideo({ video: true })<\/strong>\r\n<strong>                        .then(this.initializeVideoThen)<\/strong>\r\n\r\n<strong>                });<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n<strong>    });<\/strong>\r\n\r\n&lt;\/script&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;<\/pre>\n<p><strong>\u3010\u8ffd\u8a18\uff1a2019.07.30\u3011<\/strong>\u30d0\u30b0\u304c\u3042\u308b\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3057\u305f\u306e\u3067\u5909\u66f4\u3057\u307e\u3057\u305f\u3002\u3059\u307f\u307e\u305b\u3093\u3002<br \/>\n<strong>\u3010\u8ffd\u8a18\uff1a2022.7.4\u3011<\/strong>\u8ca0\u8377\u3092\u8efd\u6e1b\u3059\u308b\u3088\u3046\u30b3\u30fc\u30c9\u3092\u4fee\u6b63\u3057\u307e\u3057\u305f\u3002<br \/>\n<strong>\u3010\u8ffd\u8a18\uff1a2022.7.12\u3011<\/strong>iPhone \u3067\u3046\u307e\u304f\u52d5\u304b\u306a\u3044\u305f\u3081\u30b3\u30fc\u30c9\u3092\u5927\u5e45\u306b\u4fee\u6b63\u3057\u307e\u3057\u305f\u3002\uff08iOS 15.5 \u306e Safari \u3067\u52d5\u4f5c\u3092\u78ba\u8a8d\uff09<\/p>\n<p><del>\u306a\u304a\u3001QR\u30b3\u30fc\u30c9\u306e\u8aad\u307f\u53d6\u308a\u306b\u306f <a href=\"https:\/\/github.com\/cozmo\/jsQR\" target=\"_blank\" rel=\"noopener noreferrer\">jsQR<\/a> \u3068\u3044\u3046JS\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u4f7f\u3063\u3066\u3044\u308b\u306e\u3067\u3059\u304c\u3001\u3053\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u306f<code>cdn<\/code>\u304c\u5b58\u5728\u3057\u3066\u3044\u306a\u3044\u306e\u3067\u3001\u4eca\u56de\u306f<code>public\/js<\/code>\u306b<code>git clone<\/code>\u3067\u8a2d\u7f6e\u3057\u3066\u4f7f\u3044\u307e\u3059\u3002\uff08\u672c\u6765\u306f<code>npm<\/code>\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u30d3\u30eb\u30c9\u3059\u3079\u304d\u3067\u3059\u304c\u3001\u8aac\u660e\u304c\u8907\u96d1\u306b\u306a\u3063\u3066\u3057\u307e\u3046\u306e\u3067\u4eca\u56de\u306f\u5272\u611b\u3057\u307e\u3059\ud83d\ude05\uff09<\/del><\/p>\n<p><strong>\u3010\u8ffd\u8a18\uff1a2022.7.12\u3011<\/strong>cdn \u304c\u516c\u958b\u3055\u308c\u3066\u307e\u3057\u305f\u306e\u3067\u5909\u66f4\u3057\u307e\u3057\u305f\u3002<\/p>\n<p><del>\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u3067<code>public\/js<\/code>\u306b\u79fb\u52d5\u3057\u3066\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002\uff08\u3082\u3057\u304f\u306f\u30b7\u30f3\u30d7\u30eb\u306b\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u8a2d\u7f6e\u3059\u308b\u3060\u3051\u3067\u3082OK\u3067\u3059\uff09<\/del><\/p>\n<pre><strong>git clone https:\/\/github.com\/cozmo\/jsQR.git<\/strong><\/pre>\n<p><del>\u8a2d\u7f6e\u304c\u5b8c\u4e86\u3059\u308b\u3068\u3053\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/del><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3974\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/06\/qr_login_3.png\" alt=\"\" width=\"235\" height=\"113\" \/><\/p>\n<p>\u306a\u304a\u3001\u3053\u306e\u30d3\u30e5\u30fc\u306e\u4e2d\u3067\u3084\u3063\u3066\u3044\u308b\u3053\u3068\u306f\u4ee5\u4e0b\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<ol>\n<li>mounted()\u5185\u3067video\u3084canvas\u3092\u6e96\u5099\u3057\u3001\u30a6\u30a7\u30d6\u30ab\u30e1\u30e9\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b<\/li>\n<li>\u30a6\u30a7\u30d6\u30ab\u30e1\u30e9\u306b\u30a2\u30af\u30bb\u30b9\u304c\u3067\u304d\u305f\u3089renderFrame()\u3067\u7e70\u308a\u8fd4\u3057\u3001\u5185\u5bb9\u3092\u63cf\u753b\u3059\u308b<\/li>\n<li>\u3082\u3057\u63cf\u753b\u4e2d\u306bQR\u30b3\u30fc\u30c9\u304c\u8aad\u307f\u8fbc\u307e\u308c\u305f\u3089axios\u3092\u4f7f\u3063\u3066Ajax\u9001\u4fe1<\/li>\n<li>\u9001\u4fe1\u3055\u308c\u3066\u304d\u305fUUID\u3067\u30ed\u30b0\u30a4\u30f3\u304c\u3067\u304d\u305f\u3089\u30a2\u30e9\u30fc\u30c8\u3092\u8868\u793a<\/li>\n<li>\uff08\u30ed\u30b0\u30a4\u30f3\u306b\u5931\u6557\u3057\u305f\u3089\uff09\uff12\u301c\uff14\u3092\u7e70\u308a\u8fd4\u3059<\/li>\n<\/ol>\n<p>\u305d\u3057\u3066\u3001\u5b9f\u884c\u3057\u305f\u3082\u306e\u304c\u3053\u3061\u3089\u3067\u3059\uff08\u30a6\u30a7\u30d6\u30ab\u30e1\u30e9\u306b\u306f\u30b7\u30fc\u30eb\u3092\u8cbc\u3063\u3066\u3042\u308b\u72b6\u614b\u3067\u3059\uff09<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3983\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/06\/qr_login_5.png\" alt=\"\" width=\"782\" height=\"617\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/06\/qr_login_5.png 782w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/06\/qr_login_5-300x237.png 300w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/06\/qr_login_5-768x606.png 768w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/p>\n<h2>\u30ed\u30b0\u30a4\u30f3\u90e8\u5206\u3092\u3064\u304f\u308b<\/h2>\n<p>\u6b8b\u308b\u306f\u3001Ajax\u901a\u4fe1\u3067<code>UUID<\/code>\u304c\u9001\u4fe1\u3055\u308c\u3066\u304d\u305f\u3068\u304d\u306b\u30ed\u30b0\u30a4\u30f3\u3092\u5b9f\u884c\u3059\u308b\u90e8\u5206\u3067\u3059\u3002<\/p>\n<p>\u5148\u307b\u3069\u4f5c\u6210\u3057\u305f<code>QrLoginController<\/code>\u3092\u958b\u3044\u3066<code>login()<\/code>\u3092\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><strong>public function login(Request $request) {\r\n\r\n    $result = false;\r\n    $user = \\App\\User::where('uuid', $request-&gt;uuid)-&gt;first();\r\n\r\n    if(!is_null($user)) {\r\n\r\n        \\Auth::login($user);    \/\/ \u30e6\u30fc\u30b6\u30fc\u3092\u30ed\u30b0\u30a4\u30f3\u3055\u305b\u308b\r\n        $result = true;\r\n\r\n    }\r\n\r\n    return [\r\n        'result' =&gt; $result,\r\n        'user' =&gt; $user\r\n    ];\r\n\r\n}<\/strong><\/pre>\n<p>\u4e2d\u8eab\u3068\u3057\u3066\u306f\u30b7\u30f3\u30d7\u30eb\u3067\u3001\u9001\u4fe1\u3055\u308c\u3066\u304d\u305f<code>UUID<\/code>\u3092\u4f7f\u3063\u3066\u30e6\u30fc\u30b6\u30fc\u3092DB\u304b\u3089\u63a2\u3057\u51fa\u3057\u3001\u3082\u3057\u30e6\u30fc\u30b6\u30fc\u304c\u5b58\u5728\u3057\u3066\u3044\u305f\u3089<code>Auth::login()<\/code>\u3067\u5f37\u5236\u7684\u306b\u30ed\u30b0\u30a4\u30f3\u3055\u305b\u308b\u3068\u3044\u3046\u6d41\u308c\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<h1>\u30c6\u30b9\u30c8\u3057\u3066\u307f\u308b<\/h1>\n<p>\u3067\u306f\u3001\u304a\u5f85\u305f\u305b\u3057\u307e\u3057\u305f\u3002<br \/>\n\u3053\u3053\u307e\u3067\u3067\u958b\u767a\u3057\u3066\u304d\u305f\u30b3\u30fc\u30c9\u3067\u81ea\u52d5\u30ed\u30b0\u30a4\u30f3\u3092\u5b9f\u884c\u3057\u3066\u307f\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u306a\u304a\u3001\u8aad\u307f\u53d6\u308bQR\u30b3\u30fc\u30c9\u306f\u30c6\u30b9\u30c8\u30e6\u30fc\u30b6\u30fc\u306e<strong>\u300c\u592a\u90ce\u3055\u3093\u300d<\/strong>\u306e<code>UUID<\/code>\u3067\u3001QR\u30b3\u30fc\u30c9\u306e\u753b\u50cf\u306f\u3001\u3044\u3064\u3082\u4f7f\u308f\u305b\u3066\u3082\u3089\u3063\u3066\u3044\u308b<a href=\"https:\/\/qr.quel.jp\/\">QR\u306e\u30b9\u30b9\u30e1<\/a>\u3055\u3093\u3067\u30b9\u30de\u30db\u3092\u3064\u304b\u3063\u3066\u4f5c\u6210\u3059\u308b\u3053\u3068\u306b\u3057\u307e\u3059\u3002<\/p>\n<p>\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u5b9f\u884c\u7d50\u679c\u306f\u3053\u3046\u306a\u308a\u307e\u3057\u305f\uff01<\/p>\n<p>&nbsp;<\/p>\n<p>\u2193\u2193<\/p>\n<p>&nbsp;<\/p>\n<p>\u2193\u2193<\/p>\n<p>&nbsp;<\/p>\n<p>\u2193\u2193<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3976\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/06\/qr_login_4.png\" alt=\"\" width=\"640\" height=\"495\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/06\/qr_login_4.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/06\/qr_login_4-300x232.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u306f\u3044\uff01<br \/>\n\u3046\u307e\u304f\u30ed\u30b0\u30a4\u30f3\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3057\u305f\ud83d\ude0a\u2728<\/p>\n<p>\u5b9f\u969b\u306f\u30ed\u30b0\u30a4\u30f3\u3067\u304d\u305f\u3089\u30e6\u30fc\u30b6\u30fc\u5c02\u7528\u30da\u30fc\u30b8\u3078\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3059\u308b\u5f62\u306b\u306a\u308b\u3068\u601d\u3044\u307e\u3059\u304c\u3001\u4eca\u56de\u306f\u30c6\u30b9\u30c8\u306a\u306e\u3067\u3053\u3053\u3067\u7d42\u4e86\u306b\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u304a\u75b2\u308c\u69d8\u3067\u3057\u305f\uff01<\/p>\n<h1>\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\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<p>\u203b \u305f\u3060\u3057\u3001jsQR\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3084DB\u30c6\u30fc\u30d6\u30eb\u306e\u6e96\u5099\u306f\u3054\u81ea\u8eab\u3067\u5b9f\u884c\u3057\u3066\u3044\u305f\u3060\u304f\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<a  data-e-Disable-Page-Transition=\"true\" class=\"download-link\" title=\"\" href=\"https:\/\/blog.capilano-fw.com?download=3977&amp;tmstv=1777538098\" rel=\"nofollow\" id=\"download-link-3977\" data-redirect=\"false\" >\n\t\u3010Laravel + JavaScript\u3011QR\u30b3\u30fc\u30c9\u3067\u81ea\u52d5\u30ed\u30b0\u30a4\u30f3\u3059\u308b\u6a5f\u80fd<\/a>\n\n<p>&nbsp;<\/p>\n<p>\u3010\u8ffd\u8a18\uff1a2019.07.30\u3011\u30d0\u30b0\u304c\u3042\u308b\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3057\u305f\u306e\u3067\u5909\u66f4\u3057\u307e\u3057\u305f\u3002\u3059\u307f\u307e\u305b\u3093\u3002<\/p>\n<h1>\u304a\u308f\u308a\u306b<\/h1>\n<p>\u4eca\u56de\u3001QR\u30b3\u30fc\u30c9\u306e\u8aad\u307f\u53d6\u308a\u3092JavaScript\u306e\u307f\u3067\u5b9f\u884c\u3057\u3066\u307f\u307e\u3057\u305f\u304c\u3001\u611f\u60f3\u3068\u3057\u3066\u306f<strong>\u300c\u3048\u3063\u3001\u3053\u3093\u306a\u306b\u53cd\u5fdc\u65e9\u3044\u306e\uff01\uff1f\u300d<\/strong>\u3067\u3057\u305f\u3002<\/p>\n<p>\u6b63\u76f4\u306a\u3068\u3053\u308d\u3001\u30d6\u30e9\u30a6\u30b6\u3060\u3068\u3069\u3046\u3057\u3066\u3082\u52d5\u4f5c\u304c\u30e2\u30b5\u30c3\u3068\u3057\u3066\u3057\u307e\u3063\u3066\u3001\u30e6\u30fc\u30b6\u30d3\u30ea\u30c6\u30a3\u3068\u3057\u3066\u306f\u3042\u3093\u307e\u308a\u30fb\u30fb\u30fb\u306a\u3093\u3066\u3053\u3068\u306b\u306a\u308b\u306e\u304b\u3068\u601d\u3044\u304d\u3084\u3001\u3042\u307e\u308a\u306bQR\u30b3\u30fc\u30c9\u306e\u8aad\u307f\u53d6\u308a\u304c\u65e9\u304f\u3066\u30c6\u30b9\u30c8\u753b\u50cf\u306f\u4f55\u56de\u3082\u53d6\u308a\u76f4\u3057\u3057\u307e\u3057\u305f\ud83d\ude02\uff08\u3068\u3044\u3046\u306e\u3082QR\u30b3\u30fc\u30c9\u306f\u4e00\u90e8\u5206\u304c\u304b\u3051\u3066\u3044\u3066\u3082\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u53d6\u308c\u308b\u306e\u3067\u3001QR\u30b3\u30fc\u30c9\u304c\u753b\u9762\u306e\u771f\u3093\u4e2d\u306b\u6765\u306a\u3044\u306e\u306b\u81ea\u52d5\u30ed\u30b0\u30a4\u30f3\u304c\u5b8c\u4e86\u3057\u3066\u3057\u307e\u3063\u305f\u3093\u3067\u3059\uff09<\/p>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u4eca\u56de\u306fQR\u30b3\u30fc\u30c9\u3092\u8aad\u307f\u3068\u3063\u3066\u81ea\u52d5\u30ed\u30b0\u30a4\u30f3\u3059\u308b\u30b5\u30f3\u30d7\u30eb\u3092\u4f5c\u3063\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p>\u3053\u306e\u30c6\u30af\u30cb\u30c3\u30af\u3092\u4f7f\u3048\u3070\u3001\u51fa\u52e4\u30c1\u30a7\u30c3\u30af\u30b7\u30b9\u30c6\u30e0\u3082\u4f7f\u3048\u308b\u3067\u3057\u3087\u3046\u3057\u3001<code>Raspberry Pi<\/code>\u3068\u9023\u643a\u3055\u305b\u3066\u5165\u5ba4\u7ba1\u7406\u30b7\u30b9\u30c6\u30e0\u306a\u3093\u3066\u3044\u3046\u306e\u3082\u3064\u304f\u308c\u308b\u3093\u3058\u3083\u306a\u3044\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n<p>\u30c6\u30af\u30ce\u30ed\u30b8\u30fc\u306e\u9032\u6b69\u3063\u3066\u3059\u3054\u3044\u3067\u3059\u306d\u3002<\/p>\n<p>\u3067\u306f\u3067\u306f\u301c\uff01<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-417 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/04\/9.png\" alt=\"\" width=\"370\" height=\"220\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/04\/9.png 370w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/04\/9-300x178.png 300w\" sizes=\"auto, (max-width: 370px) 100vw, 370px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u5b09\u3057\u3044\u3053\u3068\u306b\u3053\u306e\u30d6\u30ed\u30b0\u3092\u59cb\u3081\u3066\u304b\u3089\u3054\u9023\u7d61\u3092\u3044\u305f\u3060\u3044\u305f\u8a2a\u554f\u30e6\u30fc\u30b6\u30fc\u69d8\u3068\u76f4\u63a5\u304a\u8a71\u3092\u3055\u305b\u3066\u3044\u305f\u3060\u304f\u3053\u3068\u3082\u5897\u3048\u3066\u304d\u305f\u306e\u3067\u3059\u304c\u3001\u3084\u306f\u308a\u305d\u3046\u3044\u3063\u305f\u5834\u5408\u306b\u306f\u300c\u305d\u3046\u304b &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.capilano-fw.com\/?p=3969\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;\u3010Laravel + JavaScript\u3011QR\u30b3\u30fc\u30c9\u3067\u81ea\u52d5\u30ed\u30b0\u30a4\u30f3\u3059\u308b\u6a5f\u80fd\u3092\u3064\u304f\u308b\uff08\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u53ef\uff09&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":3982,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19,3,97],"tags":[106,58],"class_list":["post-3969","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-javascript","category-laravel","category-97","tag-qr","tag-58"],"_links":{"self":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/3969","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=3969"}],"version-history":[{"count":13,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/3969\/revisions"}],"predecessor-version":[{"id":10783,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/3969\/revisions\/10783"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/media\/3982"}],"wp:attachment":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3969"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3969"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3969"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}