{"id":12538,"date":"2024-04-14T07:00:43","date_gmt":"2024-04-13T22:00:43","guid":{"rendered":"https:\/\/blog.capilano-fw.com\/?p=12538"},"modified":"2024-04-15T03:30:05","modified_gmt":"2024-04-14T18:30:05","slug":"line-%e3%81%ab%e3%81%8a%e5%8f%8b%e9%81%94%e7%89%b9%e5%85%b8%e3%81%ae%e5%8b%95%e7%94%bb%e3%82%92%e9%85%8d%e4%bf%a1%e3%81%97%e3%83%9e%e3%83%bc%e3%82%b1%e3%83%86%e3%82%a3%e3%83%b3%e3%82%b0%e3%81%ab","status":"publish","type":"post","link":"https:\/\/blog.capilano-fw.com\/?p=12538","title":{"rendered":"Laravel \u3067 LINE \u306b\u7279\u5178\u52d5\u753b\u3092\u914d\u4fe1\u3057\u3001\u30de\u30fc\u30b1\u30c6\u30a3\u30f3\u30b0\u3059\u308b"},"content":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u4eca\u56de\u3082\u300c<strong>\u30a8\u30f3\u30b8\u30cb\u30a2 x \u30de\u30fc\u30b1\u30c6\u30a3\u30f3\u30b0<\/strong>\u300d\u3067\u3001\u300c\u30b9\u30ad\u30eb\u3092\u639b\u3051\u7b97\u3001\u500d\u5897\u300d\u3067\u304d\u308b\u3088\u3046\u306b\u3084\u3063\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u2757<\/p>\n<p>\u4eca\u56de\u306f\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb<\/p>\n<p><strong style=\"font-size: 35px;\">LINE \u53cb\u9054\u767b\u9332\u3067\u7279\u5178\u52d5\u753b<\/strong><\/p>\n<p>\u3092\u914d\u4fe1\u3059\u308b\u6a5f\u80fd\u3067\u3059\u3002<\/p>\n<p>\u305d\u3057\u3066\u3001\u4eca\u56de\u306f\u3055\u3089\u306b\u3001\u300c<strong>\u52d5\u753b\u306e\u8996\u8074\u5c65\u6b74<\/strong>\u300d\u3092\u4fdd\u5b58\u3059\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<p>\u306a\u305c\u304b\u3068\u8a00\u3046\u3068\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb<\/p>\n<p><strong style=\"font-size: 35px;\">\u6210\u7d04\u7387\u3092\u4e0a\u3052\u308b\u305f\u3081<\/strong><\/p>\n<p>\u3067\u3059\u3002<\/p>\n<p>\u3064\u307e\u308a\u300c\u8cc7\u7523\u904b\u7528\u306e\u52d5\u753b\u3092\u898b\u305f\u4eba\u300d\u3068\u304b\u300c\u682a\u5f0f\u6295\u8cc7\u306e\u52d5\u753b\u3092\u898b\u305f\u4eba\u300d\u3068\u3044\u3046\u5c65\u6b74\u304c\u6b8b\u308b\u306e\u3067\u3001\u305d\u306e\u30c7\u30fc\u30bf\u304b\u3089\u300c<strong>\u8208\u5473\u3092\u6301\u3063\u3066\u3044\u308b\u4eba\u3060\u3051<\/strong>\u300d\u306b\u6fc3\u3044\u30bb\u30fc\u30eb\u30b9\u3067\u304d\u308b\u308f\u3051\u3067\u3059\u306d\u3002<\/p>\n<p>\u3059\u308b\u3068\u3001<strong>\u8208\u5473\u304c\u306a\u3044\u4eba\u306e\u30b3\u30df\u30e5\u30cb\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u7701\u7565\u3067\u304d\u308b<\/strong>\u306e\u3067\u3001\u7121\u99c4\u306a\u6642\u9593\uff06\u30b3\u30b9\u30c8\u3082\u6e1b\u3089\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u4eca\u56de\u306f\u300c<strong>Laravel + LINE Messaging API<\/strong>\u300d\u3067\u8907\u6570\u306e\u52d5\u753b\u3092\u914d\u4fe1\u3057\u3001\u3055\u3089\u306b\u3001\u898b\u305f\u52d5\u753b\u306e\u8996\u8074\u5c65\u6b74\u3092\u53d6\u3063\u3066\u6210\u7d04\u7387\u3092\u9ad8\u3081\u308b\u6a5f\u80fd\u3092\u4f5c\u3063\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u305c\u3072\u4f55\u304b\u306e\u53c2\u8003\u306b\u306a\u308a\u307e\u3057\u305f\u3089\u5b09\u3057\u3044\u3067\u3059\u3002\ud83d\ude04\u2728<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4445 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/08\/no_2.png\" alt=\"\" width=\"370\" height=\"310\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/08\/no_2.png 370w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/08\/no_2-300x251.png 300w\" sizes=\"auto, (max-width: 370px) 100vw, 370px\" \/>\u300c<a href=\"https:\/\/www.youtube.com\/@marketerosaru\" target=\"_blank\" rel=\"noopener\">\u30a4\u30f3\u30b0\u30ea\u30c3\u30b7\u30e5\u304a\u3055\u308b<\/a> \u3055\u3093\u3082<br \/>\n\u30a8\u30b0\u3044\u51c4\u8155\u306e<br \/>\n\u30de\u30fc\u30b1\u30bf\u30fc\u3067\u3059\u306d\uff08\u5c0a\u656c\uff01\uff09\u300d<\/p>\n<p><strong>\u958b\u767a\u74b0\u5883\uff1a<\/strong> Laravel 11.x\uff08PHP 8.3\uff09<\/p>\n<h1>\u524d\u63d0\u3068\u3057\u3066<\/h1>\n<p>\u524d\u56de\u8a18\u4e8b\u3067\u7d39\u4ecb\u3057\u305f\u4ee5\u4e0b\uff12\u3064\u306e\u4f5c\u696d\u304c\u3059\u3067\u306b\u5b8c\u4e86\u3057\u3066\u3044\u308b\u3053\u3068\u304c\u524d\u63d0\u3067\u3059\u3002<\/p>\n<ul>\n<li>LINE Messaging API \u304c\u4f7f\u3048\u308b\u3088\u3046\u306b\u3059\u308b<\/li>\n<li>\u30d1\u30c3\u30b1\u30fc\u30b8\u300clinecorp\/line-bot-sdk\u300d\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/li>\n<\/ul>\n<p>\u8a73\u3057\u304f\u306f\u3001\u524d\u56de\u8a18\u4e8b\u306b\u307e\u3068\u3081\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><strong>\ud83d\udcdd \u53c2\u8003\u30da\u30fc\u30b8\uff1a<\/strong> <a href=\"https:\/\/blog.capilano-fw.com\/?p=12525\" target=\"_blank\" rel=\"noopener\">Laravel + LINE \u30de\u30fc\u30b1\u30c6\u30a3\u30f3\u30b0\u3067\u300c\u30d1\u30fc\u30bd\u30ca\u30e9\u30a4\u30ba\u3055\u308c\u305f\u30ea\u30b9\u30c8\u53d6\u308a\u300d\u6a5f\u80fd\u3092\u3064\u304f\u308b<\/a><\/p>\n<p>\u307e\u3060\u306e\u65b9\u306f\u5148\u306b\u305d\u3061\u3089\u3092\u6e96\u5099\u3057\u3066\u304a\u3044\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h1>\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b<\/h1>\n<p>\u5b9f\u969b\u306b\u30d7\u30ed\u30b0\u30e9\u30e0\u3059\u308b\u524d\u306b\u3001<code>LINE<\/code>\u304c<code>PHP<\/code>\u7528\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u7528\u610f\u3057\u3066\u304f\u308c\u3066\u3044\u308b\u306e\u3067\u3053\u308c\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304a\u304d\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div>\n<pre><strong>composer require linecorp\/line-bot-sdk<\/strong><\/pre>\n<p><strong>\u3010\u8ffd\u8a18\uff1a2024.4.15\u3011<br \/>\n<\/strong>\u8a2a\u554f\u30e6\u30fc\u30b6\u30fc\u3055\u3093\u304c\u6df7\u4e71\u3055\u308c\u3066\u3044\u308b\u3088\u3046\u3067\u3057\u305f\u306e\u3067\u8ffd\u8a18\u3057\u307e\u3057\u305f\u3002\u8cb4\u91cd\u306a\u3054\u610f\u898b\u3042\u308a\u304c\u3068\u3046\u3054\u3056\u3044\u307e\u3057\u305f\ud83d\ude0a<\/p>\n<\/div>\n<h1>Laravel 11.x \u3092\u6295\u5165<\/h1>\n<p>\u4eca\u56de\u304b\u3089\u306f\u3001\u3064\u3044\u306b\u516c\u958b\u3055\u308c\u305f<code>Laravel 11.x<\/code>\u3092\u4f7f\u3063\u3066\u958b\u767a\u3092\u9032\u3081\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<p>\u30d5\u30a1\u30a4\u30eb\u6570\u304c\u5287\u7684\u306b\u6e1b\u3063\u3066\u3044\u308b\u3088\u3046\u3067\u3088\u308a\u7ba1\u7406\u3057\u3084\u3059\u304f\u306a\u3063\u3066\u308b\u307f\u305f\u3044\u3067\u3059\u306d\u3002<br \/>\n\u958b\u767a\u8005\u3055\u3093\u305f\u3061\u306b\u306f\u611f\u8b1d\u3067\u3059\ud83d\ude04\u2728<\/p>\n<h1>\u52d5\u753b\u3092\u7528\u610f\u3059\u308b<\/h1>\n<p><code>LINE Messaging API<\/code>\u3092\u4f7f\u3063\u3066\u52d5\u753b\u3092\u914d\u4fe1\u3059\u308b\u305f\u3081\u306b\u306f\u3001\u30a6\u30a7\u30d6\u4e0a\u306b\u52d5\u753b\u3068\u30b5\u30e0\u30cd\u30a4\u30eb\u753b\u50cf\u304c\u5b58\u5728\u3057\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u305d\u306e\u305f\u3081\u3001\u4eca\u56de\u306f\u4ee5\u4e0b\u306e\u52d5\u753b\u3092\u30a6\u30a7\u30d6\u4e0a\u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u3066\u304a\u304d\u3001\u30b5\u30e0\u30cd\u30a4\u30eb\u306f\u30c0\u30df\u30fc\u753b\u50cf\u30b5\u30fc\u30d3\u30b9\u306e <strong><a href=\"https:\/\/placehold.jp\/\" target=\"_blank\" rel=\"noopener\">placehold.jp<\/a> <\/strong>\u3055\u3093\u3092\u4f7f\u308f\u305b\u3066\u3044\u305f\u3060\u304f\u3053\u3068\u306b\u3057\u307e\u3059\u3002<\/p>\n<div style=\"width: 525px;\" class=\"wp-video\"><!--[if lt IE 9]><script>document.createElement('video');<\/script><![endif]-->\n<video class=\"wp-video-shortcode\" id=\"video-12538-1\" width=\"525\" height=\"295\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2024\/03\/test.mp4?_=1\" \/><a href=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2024\/03\/test.mp4\">https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2024\/03\/test.mp4<\/a><\/video><\/div>\n<p><img decoding=\"async\" style=\"border: 3px solid #000;\" src=\"https:\/\/placehold.jp\/3d4070\/ffffff\/640x480.jpg?text=video-1\" \/><\/p>\n<p>\u4eca\u56de\u3082\u697d\u3057\u3093\u3067\u3084\u3063\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u2757<\/p>\n<h1>DB\u5468\u308a\u3092\u3064\u304f\u308b<\/h1>\n<p>\u3067\u306f\u3001\u524d\u7f6e\u304d\u304c\u9577\u304f\u306a\u308a\u307e\u3057\u305f\u304c\u3053\u3053\u304b\u3089\u4f5c\u696d\u306b\u306f\u3044\u308a\u307e\u3059\u306d\u3002<br \/>\n\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u30e2\u30c7\u30eb\uff06\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u3092\u3064\u304f\u3063\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div>\n<pre><strong>php artisan make:model LineUser -m<\/strong>\r\n<strong>php artisan make:model LineUserVideoHistory -m<\/strong><\/pre>\n<\/div>\n<p>\u305d\u3057\u3066\u3001\u4f5c\u6210\u3055\u308c\u305f\u30d5\u30a1\u30a4\u30eb\u3092\u305d\u308c\u305e\u308c\u5909\u66f4\u3057\u307e\u3059\u3002\uff08\u4eca\u56de\u30e2\u30c7\u30eb\u306f\u5909\u66f4\u3057\u306a\u304f\u3066\u3082<code>OK<\/code>\u3067\u3059\uff09<\/p>\n<p><strong>database\/migrations\/****_**_**_******_create_line_users_table.php<\/strong><\/p>\n<div>\n<pre>&lt;?php\r\n\r\nuse Illuminate\\Database\\Migrations\\Migration;\r\nuse Illuminate\\Database\\Schema\\Blueprint;\r\nuse Illuminate\\Support\\Facades\\Schema;\r\n\r\nreturn new class extends Migration\r\n{\r\n    \/**\r\n     * Run the migrations.\r\n     *\/\r\n    public function up(): void\r\n    {\r\n        Schema::create('line_users', function (Blueprint $table) {\r\n            <strong>$table-&gt;id();<\/strong>\r\n<strong>            $table-&gt;string('line_id')-&gt;comment('LINE\u306eID');<\/strong>\r\n<strong>            $table-&gt;string('mode')-&gt;comment('\u30c1\u30e3\u30cd\u30eb\u306e\u72b6\u614b');<\/strong>\r\n<strong>            $table-&gt;string('display_name')-&gt;comment('LINE\u306e\u540d\u524d');<\/strong>\r\n<strong>            $table-&gt;timestamps();<\/strong>\r\n        });\r\n    }\r\n\r\n    \/**\r\n     * Reverse the migrations.\r\n     *\/\r\n    public function down(): void\r\n    {\r\n        Schema::dropIfExists('line_users');\r\n    }\r\n};<\/pre>\n<\/div>\n<p><strong>database\/migrations\/****_**_**_******_create_line_user_video_histories_table.php<\/strong><\/p>\n<div>\n<pre><strong>&lt;?php<\/strong>\r\n\r\n<strong>use Illuminate\\Database\\Migrations\\Migration;<\/strong>\r\n<strong>use Illuminate\\Database\\Schema\\Blueprint;<\/strong>\r\n<strong>use Illuminate\\Support\\Facades\\Schema;<\/strong>\r\n\r\n<strong>return new class extends Migration<\/strong>\r\n<strong>{<\/strong>\r\n<strong>    \/**<\/strong>\r\n<strong>     * Run the migrations.<\/strong>\r\n<strong>     *\/<\/strong>\r\n<strong>    public function up(): void<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        Schema::create('line_user_video_histories', function (Blueprint $table) {<\/strong>\r\n<strong>            $table-&gt;id();<\/strong>\r\n<strong>            $table-&gt;unsignedBigInteger('line_user_id')-&gt;comment('LINE \u306e\u30e6\u30fc\u30b6\u30fc ID');<\/strong>\r\n<strong>            $table-&gt;string('video_key')-&gt;comment('\u52d5\u753b\u306e\u30ad\u30fc');<\/strong>\r\n<strong>            $table-&gt;string('tracking_id')-&gt;comment('\u30c8\u30e9\u30c3\u30ad\u30f3\u30b0 ID');<\/strong>\r\n<strong>            $table-&gt;boolean('is_completed')-&gt;default(false)-&gt;comment('\u52d5\u753b\u3092\u6700\u5f8c\u307e\u3067\u8996\u8074\u3057\u305f\u304b\u3069\u3046\u304b');<\/strong>\r\n<strong>            $table-&gt;timestamps();<\/strong>\r\n\r\n<strong>            $table-&gt;foreign('line_user_id')-&gt;references('id')-&gt;on('line_users');<\/strong>\r\n<strong>        });<\/strong>\r\n<strong>    }<\/strong>\r\n\r\n<strong>    \/**<\/strong>\r\n<strong>     * Reverse the migrations.<\/strong>\r\n<strong>     *\/<\/strong>\r\n<strong>    public function down(): void<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        Schema::dropIfExists('line_user_video_histories');<\/strong>\r\n<strong>    }<\/strong>\r\n<strong>};<\/strong><\/pre>\n<p>\u3067\u306f\u3001\u3053\u306e\u72b6\u614b\u3067\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u521d\u671f\u5316\u3057\u3066\u304a\u304d\u307e\u3059\u3002<br \/>\n\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div>\n<pre><strong>php artisan migrate:fresh --seed<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u3001\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-12554\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2024\/04\/laravel_response_marketing_video_6.png\" alt=\"\" width=\"414\" height=\"284\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2024\/04\/laravel_response_marketing_video_6.png 414w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2024\/04\/laravel_response_marketing_video_6-300x206.png 300w\" sizes=\"auto, (max-width: 414px) 100vw, 414px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12553\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2024\/04\/laravel_response_marketing_video_5.png\" alt=\"\" width=\"514\" height=\"304\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2024\/04\/laravel_response_marketing_video_5.png 514w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2024\/04\/laravel_response_marketing_video_5-300x177.png 300w\" sizes=\"auto, (max-width: 514px) 100vw, 514px\" \/><\/p>\n<\/div>\n<\/div>\n<h1>\u30a6\u30a7\u30d6\u30d5\u30c3\u30af\u306e\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3092\u3064\u304f\u308b<\/h1>\n<p>\u6b21\u306b\u4eca\u56de\u306e\u30e1\u30a4\u30f3\u306b\u306a\u308b\u300c\u30a6\u30a7\u30d6\u30d5\u30c3\u30af\uff08<code>LINE<\/code>\u304b\u3089\u30c7\u30fc\u30bf\u3092\u53d7\u3051\u53d6\u308b\u90e8\u5206\uff09\u300d\u3067\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3092\u3064\u304f\u3063\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div>\n<pre><strong>php artisan make:controller LineMarketingWebhookController<\/strong><\/pre>\n<p>\u3061\u3087\u3063\u3068\u8907\u96d1\u3067\u3059\u304c\u3001\u4e2d\u8eab\u306f\u3053\u3046\u3057\u307e\u3059\u3002<\/p>\n<p><strong>app\/Http\/Controllers\/LineMarketingWebhookController.php<\/strong><\/p>\n<div>\n<pre><strong>&lt;?php<\/strong>\r\n\r\n<strong>namespace App\\Http\\Controllers;<\/strong>\r\n\r\n<strong>use App\\Models\\LineUser;<\/strong>\r\n<strong>use App\\Models\\LineUserVideoHistory;<\/strong>\r\n<strong>use GuzzleHttp\\Client as GuzzleClient;<\/strong>\r\n<strong>use Illuminate\\Http\\Request;<\/strong>\r\n<strong>use Illuminate\\Support\\Str;<\/strong>\r\n<strong>use LINE\\Clients\\MessagingApi\\Configuration;<\/strong>\r\n<strong>use LINE\\Clients\\MessagingApi\\Api\\MessagingApiApi;<\/strong>\r\n<strong>use LINE\\Clients\\MessagingApi\\Model\\CarouselColumn;<\/strong>\r\n<strong>use LINE\\Clients\\MessagingApi\\Model\\CarouselTemplate;<\/strong>\r\n<strong>use LINE\\Clients\\MessagingApi\\Model\\Message;<\/strong>\r\n<strong>use LINE\\Clients\\MessagingApi\\Model\\PostbackAction;<\/strong>\r\n<strong>use LINE\\Clients\\MessagingApi\\Model\\ReplyMessageRequest;<\/strong>\r\n<strong>use LINE\\Clients\\MessagingApi\\Model\\TemplateMessage;<\/strong>\r\n<strong>use LINE\\Clients\\MessagingApi\\Model\\TextMessage;<\/strong>\r\n<strong>use LINE\\Clients\\MessagingApi\\Model\\VideoMessage;<\/strong>\r\n<strong>use LINE\\Constants\\ActionType;<\/strong>\r\n<strong>use LINE\\Constants\\MessageType;<\/strong>\r\n<strong>use LINE\\Constants\\TemplateType;<\/strong>\r\n<strong>use LINE\\Parser\\EventRequestParser;<\/strong>\r\n<strong>use LINE\\Webhook\\Model\\FollowEvent;<\/strong>\r\n<strong>use LINE\\Webhook\\Model\\PostbackEvent;<\/strong>\r\n<strong>use LINE\\Webhook\\Model\\VideoPlayCompleteEvent;<\/strong>\r\n\r\n<strong>class LineMarketingWebhookController extends Controller<\/strong>\r\n<strong>{<\/strong>\r\n<strong>    const VIDEO_ITEMS = [<\/strong>\r\n<strong>        'test_1' =&gt; [<\/strong>\r\n<strong>            'video_url' =&gt; 'https:\/\/\uff08\u3042\u306a\u305f\u304c\u8a2d\u7f6e\u3057\u305f\u52d5\u753b\u306e\u3042\u308b\u30c9\u30e1\u30a4\u30f3\uff09\/videos\/test1.mp4',<\/strong>\r\n<strong>            'thumbnail_url' =&gt; 'https:\/\/placehold.jp\/3d4070\/ffffff\/640x480.jpg?text=video-1',<\/strong>\r\n<strong>            'consultation_url' =&gt; 'https:\/\/example.com\/consultation-1',<\/strong>\r\n<strong>            'title' =&gt; '\u521d\u5fc3\u8005OK\uff01\u30a6\u30a7\u30d6\u30de\u30fc\u30b1\u30c6\u30a3\u30f3\u30b0\u306e\u57fa\u672c',<\/strong>\r\n<strong>            'text' =&gt; '\u7279\u5178\u52d5\u753b 1',<\/strong>\r\n<strong>        ],<\/strong>\r\n<strong>        'test_2' =&gt; [<\/strong>\r\n<strong>            'video_url' =&gt; 'https:\/\/\uff08\u3042\u306a\u305f\u304c\u8a2d\u7f6e\u3057\u305f\u52d5\u753b\u306e\u3042\u308b\u30c9\u30e1\u30a4\u30f3\uff09\/videos\/test2.mp4',<\/strong>\r\n<strong>            'thumbnail_url' =&gt; 'https:\/\/placehold.jp\/3d4070\/ffffff\/640x480.jpg?text=video-2',<\/strong>\r\n<strong>            'consultation_url' =&gt; 'https:\/\/example.com\/consultation-2',<\/strong>\r\n<strong>            'title' =&gt; '\u5c0f\u5b66\u751f\u3067\u3082\u308f\u304b\u308b\uff01\u3089\u304f\u3089\u304f\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8b1b\u5ea7',<\/strong>\r\n<strong>            'text' =&gt; '\u7279\u5178\u52d5\u753b 2',<\/strong>\r\n<strong>        ],<\/strong>\r\n<strong>        'test_3' =&gt; [<\/strong>\r\n<strong>            'video_url' =&gt; 'https:\/\/\uff08\u3042\u306a\u305f\u304c\u8a2d\u7f6e\u3057\u305f\u52d5\u753b\u306e\u3042\u308b\u30c9\u30e1\u30a4\u30f3\uff09\/videos\/test3.mp4',<\/strong>\r\n<strong>            'thumbnail_url' =&gt; 'https:\/\/placehold.jp\/3d4070\/ffffff\/640x480.jpg?text=video-3',<\/strong>\r\n<strong>            'consultation_url' =&gt; 'https:\/\/example.com\/consultation-3',<\/strong>\r\n<strong>            'title' =&gt; '\u7a3c\u3050\u30b9\u30ad\u30eb\u3092\u8eab\u306b\u3064\u3051\u308b\uff01\u52d5\u753b\u7de8\u96c6\u5165\u9580',<\/strong>\r\n<strong>            'text' =&gt; '\u7279\u5178\u52d5\u753b 3',<\/strong>\r\n<strong>        ],<\/strong>\r\n<strong>    ];<\/strong>\r\n\r\n<strong>    private $channel_secret, $access_token;<\/strong>\r\n\r\n<strong>    public function __construct()<\/strong>\r\n<strong>    {\r\n<\/strong>        \/\/ \u672c\u6765\u306f config \u304b\u3089\u53d6\u5f97\u3059\u308b\u3079\u304d\u3067\u3059\r\n<strong>        $this-&gt;channel_secret = env('LINE_CHANNEL_SECRET');<\/strong>\r\n<strong>        $this-&gt;access_token = env('LINE_ACCESS_TOKEN');<\/strong>\r\n<strong>    }<\/strong>\r\n\r\n<strong>    public function receive(Request $request)<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        $request_body = $request-&gt;getContent();<\/strong>\r\n<strong>        $hash = hash_hmac('sha256', $request_body, $this-&gt;channel_secret, true);<\/strong>\r\n<strong>        $signature = base64_encode($hash);<\/strong>\r\n\r\n<strong>        if($signature === $request-&gt;header('X-Line-Signature')) {<\/strong>\r\n\r\n<strong>            $client = new GuzzleClient;<\/strong>\r\n<strong>            $config = new Configuration();<\/strong>\r\n<strong>            $config-&gt;setAccessToken($this-&gt;access_token);<\/strong>\r\n\r\n<strong>            $this-&gt;api = new MessagingApiApi(<\/strong>\r\n<strong>                client: $client,<\/strong>\r\n<strong>                config: $config,<\/strong>\r\n<strong>            );<\/strong>\r\n\r\n<strong>            try {<\/strong>\r\n\r\n<strong>                $event_parser = EventRequestParser::parseEventRequest($request_body, $this-&gt;channel_secret, $signature);<\/strong>\r\n\r\n<strong>                foreach($event_parser-&gt;getEvents() as $event) {<\/strong>\r\n\r\n<strong>                    logger(get_class($event));<\/strong>\r\n\r\n<strong>                    if($event instanceof FollowEvent) { \/\/ \u304a\u53cb\u9054\u306e\u767b\u9332\u3057\u305f\u3068\u304d<\/strong>\r\n\r\n<strong>                        $this-&gt;replyFollowEvent($event);<\/strong>\r\n\r\n<strong>                    } else if($event instanceof PostbackEvent) { \/\/ \u30dd\u30b9\u30c8\u30d0\u30c3\u30af\uff08\u52d5\u753b\u304c\u30af\u30ea\u30c3\u30af\uff09\u3055\u308c\u305f\u3068\u304d<\/strong>\r\n\r\n<strong>                        $this-&gt;replyPostbackEvent($event);<\/strong>\r\n\r\n<strong>                    } else if($event instanceof VideoPlayCompleteEvent) {<\/strong>\r\n\r\n<strong>                        $this-&gt;replyVideoCompleteEvent($event);<\/strong>\r\n\r\n<strong>                    }<\/strong>\r\n\r\n<strong>                }<\/strong>\r\n\r\n<strong>            } catch (\\Exception $e) {}<\/strong>\r\n\r\n<strong>        } else {<\/strong>\r\n\r\n<strong>            abort(404);<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n<strong>    }<\/strong>\r\n\r\n<strong>    private function replyFollowEvent(FollowEvent $event)<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        $reply_token = $event-&gt;getReplyToken();<\/strong>\r\n<strong>        $line_id = $event-&gt;getSource()-&gt;getUserId();<\/strong>\r\n<strong>        $mode = $event-&gt;getMode();<\/strong>\r\n<strong>        $profile = $this-&gt;api-&gt;getProfile($line_id);<\/strong>\r\n<strong>        $display_name = $profile-&gt;getDisplayName();<\/strong>\r\n\r\n<strong>        if(is_null($line_id) || is_null($mode)) {<\/strong>\r\n\r\n<strong>            return;<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n\r\n<strong>        $line_user = LineUser::where('line_id', $line_id)-&gt;first();<\/strong>\r\n\r\n<strong>        if(is_null($line_user)) {<\/strong>\r\n\r\n<strong>            $line_user = new LineUser;<\/strong>\r\n<strong>            $line_user-&gt;line_id = $line_id;<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n\r\n<strong>        $line_user-&gt;mode = $mode; \/\/ \u30c1\u30e3\u30cd\u30eb\u306e\u72b6\u614b<\/strong>\r\n<strong>        $line_user-&gt;display_name = $display_name; \/\/ LINE\u306e\u8868\u793a\u540d<\/strong>\r\n<strong>        $line_user-&gt;save();<\/strong>\r\n\r\n<strong>        $this-&gt;replySpecialVideo($reply_token);<\/strong>\r\n<strong>    }<\/strong>\r\n\r\n<strong>    private function replyPostbackEvent(PostbackEvent $event)<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        $reply_token = $event-&gt;getReplyToken();<\/strong>\r\n<strong>        $line_id = $event-&gt;getSource()-&gt;getUserId();<\/strong>\r\n<strong>        $line_user = LineUser::where('line_id', $line_id)-&gt;first();<\/strong>\r\n<strong>        $tracking_id = $line_user-&gt;id . '-' . time() . '-' . Str::random(5);<\/strong>\r\n\r\n<strong>        \/\/ \u672c\u6765\u306f try ~ catch \u3067\u30a8\u30e9\u30fc\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0\u3092\u884c\u3046\u3079\u304d\u3067\u3059<\/strong>\r\n<strong>        $query = $event-&gt;getPostback();<\/strong>\r\n<strong>        parse_str($query['data'], $output);<\/strong>\r\n<strong>        $video_key = $output['video_key'];<\/strong>\r\n<strong>        $video_item = self::VIDEO_ITEMS[$video_key];<\/strong>\r\n\r\n<strong>        $video_history = new LineUserVideoHistory();<\/strong>\r\n<strong>        $video_history-&gt;line_user_id = $line_user-&gt;id;<\/strong>\r\n<strong>        $video_history-&gt;video_key = $video_key;<\/strong>\r\n<strong>        $video_history-&gt;tracking_id = $tracking_id;<\/strong>\r\n<strong>        $video_history-&gt;save();<\/strong>\r\n\r\n<strong>        \/\/ \u52d5\u753b\u3092\u8fd4\u4fe1\u3059\u308b<\/strong>\r\n<strong>        $message = new VideoMessage([<\/strong>\r\n<strong>            'type' =&gt; MessageType::VIDEO,<\/strong>\r\n<strong>            'originalContentUrl' =&gt; $video_item['video_url'],<\/strong>\r\n<strong>            'previewImageUrl' =&gt; $video_item['thumbnail_url'],<\/strong>\r\n<strong>            'trackingId' =&gt; $tracking_id,<\/strong>\r\n<strong>        ]);<\/strong>\r\n<strong>        $this-&gt;replyMessage($reply_token, $message);<\/strong>\r\n<strong>    }<\/strong>\r\n\r\n<strong>    private function replyVideoCompleteEvent(VideoPlayCompleteEvent $event)<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        $reply_token = $event-&gt;getReplyToken();<\/strong>\r\n<strong>        $tracking_id = $event-&gt;getVideoPlayComplete()-&gt;getTrackingId();<\/strong>\r\n\r\n<strong>        $video_history = LineUserVideoHistory::where('tracking_id', $tracking_id)-&gt;first();<\/strong>\r\n<strong>        $video_history-&gt;is_completed = true;<\/strong>\r\n<strong>        $video_history-&gt;save();<\/strong>\r\n\r\n<strong>        $video_item = self::VIDEO_ITEMS[$video_history-&gt;video_key];<\/strong>\r\n<strong>        $consultation_url = $video_item['consultation_url'];<\/strong>\r\n\r\n<strong>        $message = new TextMessage([<\/strong>\r\n<strong>            'type' =&gt; 'text',<\/strong>\r\n<strong>            'text' =&gt; \"\u300c\". $video_item['title'] .\"\u300d\u3092\u6700\u5f8c\u307e\u3067\u3054\u8996\u8074\u3044\u305f\u3060\u3044\u305f\u65b9\u9650\u5b9a\u3067\u3001\u7121\u6599\u306e\u500b\u5225\u76f8\u8ac7\u306e\u6848\u5185\u3092\u3055\u305b\u3066\u3044\u305f\u3060\u3044\u3066\u304a\u308a\u307e\u3059\u3002\\n\u2193\u2193\u2193\\n\\n{$consultation_url}\",<\/strong>\r\n<strong>        ]);<\/strong>\r\n<strong>        $this-&gt;replyMessage($reply_token, $message);<\/strong>\r\n<strong>    }<\/strong>\r\n\r\n<strong>    private function replySpecialVideo(string $reply_token)<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        $template_columns = [];<\/strong>\r\n\r\n<strong>        foreach (self::VIDEO_ITEMS as $key =&gt; $video_item) {<\/strong>\r\n\r\n<strong>            $template_columns[] = new CarouselColumn([<\/strong>\r\n<strong>                'title' =&gt; $video_item['title'],<\/strong>\r\n<strong>                'text' =&gt; $video_item['text'],<\/strong>\r\n<strong>                'thumbnailImageUrl' =&gt; $video_item['thumbnail_url'],<\/strong>\r\n<strong>                'actions' =&gt; [<\/strong>\r\n<strong>                    new PostbackAction([<\/strong>\r\n<strong>                        'type' =&gt; ActionType::POSTBACK,<\/strong>\r\n<strong>                        'label' =&gt; '\u518d\u751f\u3059\u308b',<\/strong>\r\n<strong>                        'data' =&gt; 'video_key='. $key,<\/strong>\r\n<strong>                    ]),<\/strong>\r\n<strong>                ],<\/strong>\r\n<strong>            ]);<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n\r\n<strong>        $template_message = new TemplateMessage([<\/strong>\r\n<strong>            'type' =&gt; MessageType::TEMPLATE,<\/strong>\r\n<strong>            'altText' =&gt; 'Button alt text',<\/strong>\r\n<strong>            'template' =&gt; new CarouselTemplate([<\/strong>\r\n<strong>                'type' =&gt; TemplateType::CAROUSEL,<\/strong>\r\n<strong>                'columns' =&gt; $template_columns,<\/strong>\r\n<strong>            ]),<\/strong>\r\n<strong>        ]);<\/strong>\r\n<strong>        $this-&gt;replyMessage($reply_token, $template_message);<\/strong>\r\n<strong>    }<\/strong>\r\n\r\n<strong>    private function replyMessage(string $reply_token, Message $message): bool<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        try {<\/strong>\r\n\r\n<strong>            $request = new ReplyMessageRequest([<\/strong>\r\n<strong>                'replyToken' =&gt; $reply_token,<\/strong>\r\n<strong>                'messages' =&gt; [$message],<\/strong>\r\n<strong>            ]);<\/strong>\r\n<strong>            $this-&gt;api-&gt;replyMessage($request);<\/strong>\r\n\r\n<strong>        } catch (\\Exception $e) {<\/strong>\r\n\r\n<strong>            logger($e-&gt;getMessage());<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n\r\n<strong>        return true;<\/strong>\r\n<strong>    }<\/strong>\r\n<strong>}<\/strong><\/pre>\n<\/div>\n<div>\n<p>\u5b9f\u884c\u6642\u306e\u6d41\u308c\u306f\u3053\u3046\u306a\u308a\u307e\u3059\u3002<\/p>\n<ol>\n<li>\u304a\u53cb\u9054\u767b\u9332\u3059\u308b<\/li>\n<li>\uff13\u3064\u306e\u7279\u5178\u52d5\u753b\u3092\u914d\u4fe1<\/li>\n<li>\u52d5\u753b\u3092\u898b\u308b<\/li>\n<li>\u898b\u305f\u52d5\u753b\u306b\u95a2\u3059\u308b\u500b\u5225\u76f8\u8ac7URL\u3092\u81ea\u52d5\u3067\u9001\u4fe1<\/li>\n<\/ol>\n<p>\u3053\u3046\u3059\u308b\u3053\u3068\u306b\u3088\u3063\u3066\u3001\u5192\u982d\u90e8\u5206\u3067\u7d39\u4ecb\u3057\u305f\u300c<strong>\u8208\u5473\u3092\u6301\u3063\u3066\u3044\u308b\u4eba\u3060\u3051\u306b\u6fc3\u3044\u30bb\u30fc\u30eb\u30b9<\/strong>\u300d\u304c\u3067\u304d\u308b\u4ed5\u7d44\u307f\u306b\u306a\u3063\u3066\u307e\u3059\u3002<\/p>\n<p>\u3057\u304b\u3082\u3053\u308c\u3001\u300c\u30d7\u30c3\u30b7\u30e5\u9001\u4fe1\u300d\u306f\u4e00\u5207\u4f7f\u3063\u3066\u3044\u306a\u3044\u306e\u3067\u3001<strong>\u3059\u3079\u3066\u7121\u6599\u3067\u904b\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059<\/strong>\u2757\uff08\u30b5\u30fc\u30d0\u30fc\u4ee3\u306a\u3069\u306f\u9664\u304f\uff09<\/p>\n<p><code>LINE Messaging API<\/code>\u3001\u3059\u3054\u3044\u3067\u3059\u306d\ud83d\udc4d<\/p>\n<h1>.env \u306b\u30c8\u30fc\u30af\u30f3\u3092\u30bb\u30c3\u30c8\u3059\u308b<\/h1>\n<p>\u306a\u304a\u3001\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u5185\u3067\u306f\u300c\u30b7\u30fc\u30af\u30ec\u30c3\u30c8\u30ad\u30fc\u300d\u3068\u300c\u30a2\u30af\u30bb\u30b9\u30c8\u30fc\u30af\u30f3\u300d\u306f<code>.env<\/code>\u304b\u3089\u53d6\u5f97\u3059\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u308b\u306e\u3067\u6c17\u3092\u3064\u3051\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><strong>.env<\/strong><\/p>\n<div>\n<pre>LINE_CHANNEL_SECRET=\"\uff08\u3053\u3053\u306b\u30b7\u30fc\u30af\u30ec\u30c3\u30c8\u30ad\u30fc\uff09\"\r\nLINE_ACCESS_TOKEN=\"\uff08\u3053\u3053\u306b\u30a2\u30af\u30bb\u30b9\u30c8\u30fc\u30af\u30f3\uff09\"<\/pre>\n<\/div>\n<\/div>\n<\/div>\n<h1>CSRF\u30c8\u30fc\u30af\u30f3\u306e\u30c1\u30a7\u30c3\u30af\u3092\u89e3\u9664\u3059\u308b<\/h1>\n<p>\u4eca\u56de\u3082\u30a6\u30a7\u30d6\u30d5\u30c3\u30af\u3092\u4f7f\u3046\u306e\u3067\u3001\u305d\u306e<code>URL<\/code>\u3060\u3051\u306f<code>CSRF<\/code>\u30c8\u30fc\u30af\u30f3\u306e\u30c1\u30a7\u30c3\u30af\u3092\u89e3\u9664\u3057\u3066\u304a\u304d\u307e\u3059\uff08\u3057\u306a\u3044\u3068\u30a6\u30a7\u30d6\u30d5\u30c3\u30af\u304c\u30d6\u30ed\u30c3\u30af\u3055\u308c\u307e\u3059\uff09<\/p>\n<p>\u306a\u304a\u3001<code>Laravel 11.x<\/code>\u304b\u3089\u306f\u89e3\u9664\u306e\u65b9\u6cd5\u304c\u5909\u308f\u3063\u3066\u3044\u307e\u3059\u306e\u3067\u3001\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><strong>bootstrap\/app.php<\/strong><\/p>\n<div>\n<pre>&lt;?php\r\n\r\nuse Illuminate\\Foundation\\Application;\r\nuse Illuminate\\Foundation\\Configuration\\Exceptions;\r\nuse Illuminate\\Foundation\\Configuration\\Middleware;\r\n\r\nreturn Application::configure(basePath: dirname(__DIR__))\r\n    -&gt;withRouting(\r\n        web: __DIR__.'\/..\/routes\/web.php',\r\n        commands: __DIR__.'\/..\/routes\/console.php',\r\n        health: '\/up',\r\n    )\r\n    -&gt;withMiddleware(function (Middleware $middleware) {\r\n        <strong>$middleware-&gt;validateCsrfTokens(except: [ \/\/ \ud83d\udc48 \u3053\u3053\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f<\/strong>\r\n<strong>            'line_marketing\/webhook\/receive',<\/strong>\r\n<strong>        ]);\r\n<\/strong>\r\n    })\r\n    -&gt;withExceptions(function (Exceptions $exceptions) {\r\n        \/\/\r\n    })-&gt;create();<\/pre>\n<p><code>Laravel 11.x<\/code>\u304b\u3089\u306f<code>bootstrap\/app.php<\/code>\u3092\u3088\u304f\u4f7f\u3046\u3053\u3068\u306b\u306a\u308a\u305d\u3046\u3067\u3059\u306d\u3002<\/p>\n<\/div>\n<h1>\u30eb\u30fc\u30c8\u3092\u3064\u304f\u308b<\/h1>\n<p>\u3067\u306f\u3001\u6700\u5f8c\u306b\u30eb\u30fc\u30c8\u3092\u3064\u304f\u308a\u307e\u3059\u3002<\/p>\n<p><strong>routes\/web.php<\/strong><\/p>\n<div>\n<pre><strong>use App\\Http\\Controllers\\LineMarketingWebhookController;<\/strong>\r\n\r\n<strong>\/\/\u3000\u7701\u7565<\/strong>\r\n\r\n<strong>Route::prefix('line_marketing')-&gt;group(function(){<\/strong>\r\n\r\n<strong>    Route::prefix('webhook')-&gt;controller(LineMarketingWebhookController::class)-&gt;group(function(){<\/strong>\r\n\r\n<strong>        Route::post('receive', 'receive')-&gt;name('line_marketing.receive');<\/strong>\r\n\r\n<strong>    });<\/strong>\r\n\r\n<strong>});<\/strong><\/pre>\n<p>\u3053\u308c\u3067\u4f5c\u696d\u306f\u5b8c\u4e86\u3067\u3059\u2757<br \/>\n\u304a\u75b2\u308c\u69d8\u3067\u3057\u305f\u3002\ud83d\ude04<\/p>\n<h1>\u30c6\u30b9\u30c8\u3057\u3066\u307f\u308b<\/h1>\n<p>\u3067\u306f\u3001\u5b9f\u969b\u306b\u30c6\u30b9\u30c8\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u2757<\/p>\n<p>\u307e\u305a\u3001\u304a\u53cb\u9054\u767b\u9332\u3092\u3057\u307e\u3059\u3002\uff08<code>LINE Developers<\/code>\u306e\u30b3\u30f3\u30bd\u30fc\u30eb\u306b<code>QR<\/code>\u30b3\u30fc\u30c9\u304c\u3042\u308b\u306e\u3067\u3001\u305d\u308c\u3092\u8aad\u307f\u53d6\u3063\u3066\u304f\u3060\u3055\u3044\uff09<\/p>\n<p>\u3059\u308b\u3068\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb<\/p>\n<\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12544\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2024\/03\/laravel_response_marketing_video_1.png\" alt=\"\" width=\"640\" height=\"646\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2024\/03\/laravel_response_marketing_video_1.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2024\/03\/laravel_response_marketing_video_1-297x300.png 297w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2024\/03\/laravel_response_marketing_video_1-150x150.png 150w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2024\/03\/laravel_response_marketing_video_1-100x100.png 100w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u306f\u3044\u2757<br \/>\n\uff08\u898b\u3048\u3066\u3044\u306a\u3044\u90e8\u5206\u3082\u3042\u308a\u307e\u3059\u304c\uff09\uff13\u3064\u52d5\u753b\u304c\u9001\u4fe1\u3055\u308c\u3066\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>\u3067\u306f\u3001\uff11\u3064\u76ee\u306e\u52d5\u753b\u4e0b\u306b\u3042\u308b\u300c<strong>\u518d\u751f\u3059\u308b<\/strong>\u300d\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u3069\u3046\u306a\u308b\u3067\u3057\u3087\u3046\u304b\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12545\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2024\/03\/laravel_response_marketing_video_2.png\" alt=\"\" width=\"640\" height=\"318\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2024\/03\/laravel_response_marketing_video_2.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2024\/03\/laravel_response_marketing_video_2-300x149.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u306f\u3044\u2757<br \/>\n\u300c<strong>video-1<\/strong>\u300d\u304c\u914d\u4fe1\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<p>\u3067\u306f\u3001\u3053\u306e\u72b6\u614b\u3067<code>DB<\/code>\u30c6\u30fc\u30d6\u30eb\u3082\u78ba\u8a8d\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12547\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2024\/03\/laravel_response_marketing_video_4.png\" alt=\"\" width=\"527\" height=\"273\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2024\/03\/laravel_response_marketing_video_4.png 527w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2024\/03\/laravel_response_marketing_video_4-300x155.png 300w\" sizes=\"auto, (max-width: 527px) 100vw, 527px\" \/><\/p>\n<p>\u30c8\u30e9\u30c3\u30ad\u30f3\u30b0ID\uff08\u52d5\u753b\u306e\u8ffd\u8de1ID\uff09\u306a\u3069\u4fdd\u5b58\u3055\u308c\u3001\u3055\u3089\u306b\u300c\u52d5\u753b\u3092\u6700\u5f8c\u307e\u3067\u898b\u305f\u300d\u30d5\u30e9\u30b0\u306f<code>false<\/code>\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3044\u3044\u3067\u3059\u306d\u3002<\/p>\n<p>\u3067\u306f\u3001\u3053\u308c\u3092\u518d\u751f\u3057\u3066\u6700\u5f8c\u307e\u3067\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\uff08\u5c11\u3057\u6642\u9593\u304c\u304b\u304b\u308a\u307e\u3059\u304c\u30fb\u30fb\u30fb\uff09<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12549\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2024\/03\/laravel_response_marketing_video_3.png\" alt=\"\" width=\"640\" height=\"466\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2024\/03\/laravel_response_marketing_video_3.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2024\/03\/laravel_response_marketing_video_3-300x218.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u306f\u3044\u2757<\/p>\n<p>\u81ea\u52d5\u3067\u500b\u5225\u76f8\u8ac7\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u9001\u4fe1\u3055\u308c\u3066\u304d\u307e\u3057\u305f\u3002<br \/>\n\u3057\u304b\u3082\u3001\u300c<strong>\u52d5\u753b\uff11<\/strong>\u300d\u3092\u898b\u305f\u306e\u3067<code>URL<\/code>\u306f\uff11\u756a\u76ee\u306e\u3082\u306e\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><code>DB<\/code>\u30c6\u30fc\u30d6\u30eb\u306f\u3069\u3046\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12555\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2024\/04\/laravel_response_marketing_video_7.png\" alt=\"\" width=\"559\" height=\"271\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2024\/04\/laravel_response_marketing_video_7.png 559w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2024\/04\/laravel_response_marketing_video_7-300x145.png 300w\" sizes=\"auto, (max-width: 559px) 100vw, 559px\" \/><\/p>\n<p>\u306f\u3044\u2757<br \/>\n\u52d5\u753b\u8996\u8074\u304c\u5b8c\u4e86\u3057\u305f\u3053\u3068\u304c\u5206\u304b\u308b<code>is_completed<\/code>\u304c<code>1<\/code>\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3059\u3079\u3066\u6210\u529f\u3067\u3059\ud83d\ude04\u2728<\/p>\n<h1>\u4f01\u696d\u69d8\u3078\u306e\u3054\u63d0\u6848<\/h1>\n<p>\u4eca\u56de\u306e\u30b7\u30b9\u30c6\u30e0\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u3088\u308a\u78ba\u5b9f\u6027\u306e\u9ad8\u3044\u96c6\u5ba2\u3092\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001\u4eca\u56de\u306f\u52d5\u753b\u3092\u898b\u3066\u3059\u3050\u500b\u5225\u76f8\u8ac7\u306e<code>URL<\/code>\u3092\u9001\u4ed8\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u5c11\u3057\u300c\u6559\u80b2\u300d\u304c\u5fc5\u8981\u306a\u5834\u5408\u3001<code>LINE<\/code>\u3067\u30e1\u30eb\u30de\u30ac\u3092\u767a\u884c\u3057\u3001\u305d\u306e\u4e2d\u3067\u300c<strong>\u8cb7\u308f\u306a\u3044\u7406\u7531<\/strong>\u300d\u3092\u3067\u304d\u308b\u3060\u3051\u306a\u304f\u3057\u3066\u3001\u6700\u7d42\u7684\u306b\u30bb\u30fc\u30eb\u30b9\u3092\u3059\u308b\u3068\u3044\u3046\u4f5c\u6210\u3092\u53d6\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u3082\u3057\u305d\u3046\u3044\u3063\u305f\u3054\u76f8\u8ac7\u304c\u3042\u308a\u307e\u3057\u305f\u3089\u3001\u3044\u3064\u3067\u3082\u304a\u6c17\u8efd\u306b\u304a\u554f\u3044\u5408\u308f\u305b\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u304a\u5f85\u3061\u3057\u3066\u304a\u308a\u307e\u3059\u3002\ud83d\ude04\u2728<\/p>\n<h1>\u304a\u308f\u308a\u306b<\/h1>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u4eca\u56de\u306f\u52d5\u753b\u3092\u4f7f\u3063\u305f<code>LINE<\/code>\u30de\u30fc\u30b1\u30c6\u30a3\u30f3\u30b0\u306e\u30b7\u30b9\u30c6\u30e0\u3092\u69cb\u7bc9\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p>\u3053\u3046\u3044\u3063\u305f\u30b7\u30b9\u30c6\u30e0\u306f\u6709\u6599\u30b5\u30fc\u30d3\u30b9\u3060\u3051\u3067\u3057\u304b\u5b9f\u73fe\u3067\u304d\u306a\u3044\u3068\u601d\u308f\u308c\u3066\u3044\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304c\u3001\u5de5\u592b\u306b\u3088\u3063\u3066\u306f\u7121\u6599\u3067\u904b\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u305d\u308c\u306b\u3057\u3066\u3082\u30de\u30fc\u30b1\u30c6\u30a3\u30f3\u30b0\u624b\u6cd5\u3092\u8003\u3048\u308b\u4eba\u3063\u3066\u30db\u30f3\u30c8\u8ce2\u3044\u3067\u3059\u306d\u3002<\/p>\n<p>\u8a00\u308f\u308c\u308c\u3070\u3001\u300c\u3042\u3001\u305f\u3057\u304b\u306b\ud83d\ude04\u300d\u3063\u3066\u306a\u308a\u307e\u3059\u3051\u3069\u3001\u3053\u3046\u3044\u3046\u306e\u304c\u3067\u304d\u308b\u4eba\u306f\u5f37\u3044\u3067\u3057\u3087\u3046\u306d\u3002<\/p>\n<p>\u79c1\u306f<code>TTP<\/code>\uff08\u5fb9\u5e95\u7684\u306b\u30d1\u30af\u308b\uff09\u3067\u3084\u3063\u3066\u3044\u304d\u307e\u3059\uff08\u5c0a\u656c\u3092\u8fbc\u3081\u3066\uff01\uff09<\/p>\n<p>\u7686\u3055\u3093\u3082\u305c\u3072\u30de\u30fc\u30b1\u30c6\u30a3\u30f3\u30b0\u3092\u4f7f\u3063\u305f\u30b7\u30b9\u30c6\u30e0\u3092\u4f5c\u3063\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u306d\u3002<\/p>\n<p>\u3067\u306f\u3067\u306f\u301c\u2757<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-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\u53cb\u4eba\u304c\u6771\u4eac\u4e38\u306e\u5185<br \/>\n\u306e\u30d3\u30eb\u3067\u6b21\u9577\u306b\u306a\u3063\u3066\u307e\u3057\u305f<br \/>\n\u4e0a\u308a\u8a70\u3081\u305f\u306a\u3041\ud83d\ude02\u300d<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u4eca\u56de\u3082\u300c\u30a8\u30f3\u30b8\u30cb\u30a2 x \u30de\u30fc\u30b1\u30c6\u30a3\u30f3\u30b0\u300d\u3067\u3001\u300c\u30b9\u30ad\u30eb\u3092\u639b\u3051\u7b97\u3001\u500d\u5897\u300d\u3067\u304d\u308b\u3088\u3046\u306b\u3084\u3063\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u2757 \u4eca\u56de\u306f\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb LINE \u53cb\u9054\u767b\u9332\u3067\u7279\u5178\u52d5\u753b &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.capilano-fw.com\/?p=12538\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;Laravel \u3067 LINE \u306b\u7279\u5178\u52d5\u753b\u3092\u914d\u4fe1\u3057\u3001\u30de\u30fc\u30b1\u30c6\u30a3\u30f3\u30b0\u3059\u308b&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":12559,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,258],"tags":[164],"class_list":["post-12538","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-laravel","category-258","tag-line"],"_links":{"self":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/12538","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=12538"}],"version-history":[{"count":13,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/12538\/revisions"}],"predecessor-version":[{"id":12646,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/12538\/revisions\/12646"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/media\/12559"}],"wp:attachment":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=12538"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=12538"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=12538"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}