{"id":12168,"date":"2023-12-10T07:00:44","date_gmt":"2023-12-09T22:00:44","guid":{"rendered":"https:\/\/blog.capilano-fw.com\/?p=12168"},"modified":"2023-11-22T02:31:35","modified_gmt":"2023-11-21T17:31:35","slug":"line-messaging-api-%e3%81%a7%e7%94%bb%e5%83%8f%e3%81%a4%e3%81%8d%e9%80%9a%e5%a0%b1%e3%82%b7%e3%82%b9%e3%83%86%e3%83%a0%e3%82%92%e3%81%a4%e3%81%8f%e3%82%8b%ef%bc%88%e7%a5%9e%e6%88%b8%e5%b8%82%e3%81%ab","status":"publish","type":"post","link":"https:\/\/blog.capilano-fw.com\/?p=12168","title":{"rendered":"Line Messaging API \u3067\u753b\u50cf\u3064\u304d\u901a\u5831\u30b7\u30b9\u30c6\u30e0\u3092\u3064\u304f\u308b\uff08\u795e\u6238\u5e02\u306b\u5f71\u97ff\u3055\u308c\u3066\uff09"},"content":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u79c1\u306f\uff08\u307b\u307c\u590f\u3060\u3051\u3067\u3059\u304c\uff09\u5404\u5730\u3092\u56de\u3063\u3066\u3044\u308d\u3044\u308d\u306a\u300c\u73cd\u30b9\u30dd\u30c3\u30c8\u300d\u3092\u5de1\u308b\u306e\u304c\u5927\u597d\u304d\u306a\u3093\u3067\u3059\u304c\u3001\u305d\u3093\u306a\u79c1\u304c\u300c<strong>\u3078\u3047\u3001\u3053\u308c\u4fbf\u5229\u306a\u30b7\u30b9\u30c6\u30e0\u3060\u306a\u2757<\/strong>\u300d\u3068\u601d\u3063\u305f\u30cb\u30e5\u30fc\u30b9\u304c\u3042\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u305d\u308c\u304c\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb<\/p>\n<p><strong style=\"font-size: 35px;\">\u9053\u8def\u3084\u516c\u5712\u306e\u4e0d\u5177\u5408\u3092 LINE \u3067\uff08\u5199\u771f &amp; \u4f4d\u7f6e\u60c5\u5831\u3064\u304d\u3067\uff09\u901a\u5831\u3067\u304d\u308b<\/strong><\/p>\n<p>\u516c\u5171\u30b7\u30b9\u30c6\u30e0\u3067\u3059\u3002<\/p>\n<p><strong>\ud83d\udcdd \u53c2\u8003\u30da\u30fc\u30b8\uff1a<\/strong>\u00a0<a href=\"https:\/\/nordot.app\/1090995926904161199?utm_source=pocket_saves\" target=\"_blank\" rel=\"noopener\">\u300c\u9053\u8def\u3084\u516c\u5712\u306e\u4e0d\u5177\u5408\u3092LINE\u3067\u6559\u3048\u3066\u300d\u795e\u6238\u5e02\u304c\u65b0\u30b5\u30fc\u30d3\u30b9\u767a\u8868<\/a><\/p>\n<p>\u3064\u307e\u308a\u3001\u3082\u3057\u4f55\u304b\u3092\u767a\u898b\u3057\u3066\u3082\u3044\u3061\u3044\u3061\u5f79\u6240\u307e\u3067\u96fb\u8a71\u3057\u305f\u308a\u3001\u884c\u304b\u306a\u304f\u3066\u3082\u795e\u6238\u5e02\u306b\u300c<strong>\u3053\u3093\u306a\u4e0d\u5177\u5408\u304c\u3042\u308b\u3088<\/strong>\u300d\u3068\u6559\u3048\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3068\u3044\u3046\u30b5\u30fc\u30d3\u30b9\u3067\u3059\u3002<\/p>\n<p>\u3061\u306a\u307f\u306b\u79c1\u306f\uff08\u5b8c\u5168\u8da3\u5473\u3067\uff09\u00a0<a href=\"https:\/\/machi-collection.com\/\" target=\"_blank\" rel=\"noopener\">\u8857\u89d2\u30b3\u30ec\u30af\u30b7\u30e7\u30f3<\/a> \u3068\u3044\u3046\u30b5\u30a4\u30c8\u3092\u904b\u55b6\u3057\u3066\u3044\u3066\u3001\u3042\u308a\u304c\u305f\u3044\u3053\u3068\u306b\u591a\u6570\u306e\u5199\u771f\u3092\u30e6\u30fc\u30b6\u30fc\u3055\u3093\u304b\u3089\u3054\u6295\u7a3f\u3044\u305f\u3060\u3044\u305f\u3053\u3068\u304c\u3042\u308b\u306e\u3067\u3059\u304c\u3001\u3053\u306e\u30b7\u30b9\u30c6\u30e0\u3092\u4f7f\u3048\u3070\u30e6\u30fc\u30b6\u30fc\u3055\u3093\u304c\u3088\u308a\u4fbf\u5229\u306b\u306a\u308b\u3093\u3058\u3083\u306a\u3044\u304b\u3068\u601d\u3044\u3001\u4e00\u5ea6\u30c6\u30b9\u30c8\u3067\u4f5c\u3063\u3066\u307f\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u305d\u3053\u3067\u2757<\/p>\n<p>\u4eca\u56de\u306f\u300c<strong>LINE Messaging API + Laravel<\/strong>\u300d\u3067\u30b7\u30f3\u30d7\u30eb\u7248\u306e\u300c<strong>\u5199\u771f &amp; \u4f4d\u7f6e\u60c5\u5831<\/strong>\u300d\u304c\u6295\u7a3f\u3067\u304d\u308b\u6a5f\u80fd\u3092\u3064\u304f\u3063\u3066\u307f\u308b\u3053\u3068\u306b\u3057\u307e\u3059\u3002<\/p>\n<p>\u305c\u3072\u4f55\u304b\u306e\u53c2\u8003\u306b\u306a\u308a\u307e\u3057\u305f\u3089\u5b09\u3057\u3044\u3067\u3059\u3002\ud83d\ude04\u2728<\/p>\n<p>\u203b \u8857\u89d2\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u306e \u300c<strong>\u8857\u89d2\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u30fb\u5199\u771f\u6295\u7a3f\u30b7\u30b9\u30c6\u30e0<\/strong>\u300d\u306f<a href=\"https:\/\/line.me\/R\/ti\/p\/%40625kwumo\" target=\"_blank\" rel=\"noopener\">\u3053\u3061\u3089<\/a>\u00a0\u304b\u3089\u304a\u53cb\u9054\u767b\u9332\u3067\u304d\u307e\u3059\uff01<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9470 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/08\/no_13.png\" alt=\"\" width=\"294\" height=\"320\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/08\/no_13.png 294w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/08\/no_13-276x300.png 276w\" sizes=\"auto, (max-width: 294px) 100vw, 294px\" \/>\u300c\u53cb\u4eba\u304c\u304f\u308c\u305f<br \/>\n\u304a\u571f\u7523\u306e\u30af\u30e9\u30d5\u30c8\u30d3\u30fc\u30eb<br \/>\n\u30a6\u30de\u30a6\u30de\u3067\u3057\u305f\ud83c\udf7b\u300d<\/p>\n<p><strong>\u958b\u767a\u74b0\u5883\uff1a<\/strong> Laravel 10.x<\/p>\n<h1>\u524d\u63d0\u3068\u3057\u3066<\/h1>\n<p>\u4eca\u56de\u306f<code>LINE Messaging API<\/code>\u3092\u4f7f\u3063\u3066\u5b9f\u88c5\u3059\u308b\u306e\u3067\u3001<strong><a href=\"https:\/\/developers.line.biz\/ja\/\" target=\"_blank\" rel=\"noopener\">LINE Developers<\/a><\/strong> \u306b\u767b\u9332\u3057\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u307e\u3060\u306e\u65b9\u306f\u4ee5\u4e0b\u3092\u3054\u89a7\u306b\u306a\u3063\u3066\u5148\u306b\u767b\u9332\u3057\u3066\u304a\u3044\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><strong>\ud83d\udcdd \u53c2\u8003\u30da\u30fc\u30b8<\/strong>\uff1a\u00a0<a href=\"https:\/\/blog.capilano-fw.com\/?p=4285#LINE_Developers\" target=\"_blank\" rel=\"noopener\">LINE Developers\u306b\u30a2\u30ab\u30a6\u30f3\u30c8\u3092\u4f5c\u308b<\/a><\/p>\n<p>\u203b \u3054\u6ce8\u610f\uff1a \u6614\u306e\u8a18\u4e8b\u3067\u3059\u306e\u3067\u3001\u3061\u3087\u3063\u3068\u9055\u3063\u3066\u3044\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u3067\u306f\u3001\u4eca\u56de\u3082\u697d\u3057\u3093\u3067\u3084\u3063\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u2757<\/p>\n<h1>LINE Developers \u3067\u300c\u30c1\u30e3\u30cd\u30eb\uff08\u30dc\u30c3\u30c8\uff09\u300d\u3092\u3064\u304f\u308b<\/h1>\n<p>&nbsp;<\/p>\n<p>\u307e\u305a\u30b3\u30f3\u30bd\u30fc\u30eb\u306b\u3042\u308b\u300c<strong>Admin<\/strong>\u300d\u304b\u3089\u30d7\u30ed\u30d0\u30a4\u30c0\u30fc\u3092\u9078\u629e\u3057\u3001\u300c<strong>\u65b0\u898f\u30c1\u30e3\u30cd\u30eb\u4f5c\u6210<\/strong>\u300d\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12172\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/11\/line_messaging_api_report_system_1.png\" alt=\"\" width=\"640\" height=\"586\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/11\/line_messaging_api_report_system_1.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/11\/line_messaging_api_report_system_1-300x275.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30dd\u30c3\u30d7\u30a2\u30c3\u30d7\u304c\u8868\u793a\u3055\u308c\u308b\u306e\u3067\u300c<strong>Messaging API<\/strong>\u300d\u3092\u30af\u30ea\u30c3\u30af\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12171\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/11\/line_messaging_api_report_system_2.png\" alt=\"\" width=\"640\" height=\"321\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/11\/line_messaging_api_report_system_2.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/11\/line_messaging_api_report_system_2-300x150.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u30da\u30fc\u30b8\u79fb\u52d5\u3057\u305f\u5148\u306b\u3042\u308b\u30d5\u30a9\u30fc\u30e0\u306b\u5fc5\u8981\u306a\u9805\u76ee\u3092\u5165\u529b\uff06\u30c1\u30a7\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12170\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/11\/line_messaging_api_report_system_3.png\" alt=\"\" width=\"640\" height=\"397\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/11\/line_messaging_api_report_system_3.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/11\/line_messaging_api_report_system_3-300x186.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u4f5c\u6210\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12169\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/11\/line_messaging_api_report_system_4.png\" alt=\"\" width=\"112\" height=\"68\" \/><\/p>\n<p>\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u767b\u9332\u304c\u5b8c\u4e86\u3059\u308b\u306e\u3067\u4ee5\u4e0b\uff12\u3064\u306e\u5834\u6240\u306b\u3042\u308b\uff12\u3064\u306e\u300c<strong>\u30c8\u30fc\u30af\u30f3\uff08\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u3088\u3046\u306a\u3082\u306e\uff09<\/strong>\u300d\u3092\u53d6\u5f97\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<ul>\n<li>\u30b3\u30f3\u30bd\u30fc\u30eb \u2192 Messaging API\u8a2d\u5b9a \u2192 \u30c1\u30e3\u30cd\u30eb\u30a2\u30af\u30bb\u30b9\u30c8\u30fc\u30af\u30f3<\/li>\n<li>\u30b3\u30f3\u30bd\u30fc\u30eb \u2192 \u30c1\u30e3\u30cd\u30eb\u57fa\u672c\u8a2d\u5b9a \u2192 \u30c1\u30e3\u30cd\u30eb\u30b7\u30fc\u30af\u30ec\u30c3\u30c8<\/li>\n<\/ul>\n<p>\u305d\u3057\u3066\u3001\u305d\u308c\u3089\u306e\u30c8\u30fc\u30af\u30f3\u306f<code>Laravel<\/code>\u306e<code>.env<\/code>\u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u30bb\u30c3\u30c8\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><strong>.env<\/strong><\/p>\n<div>\n<pre><strong>LINE_POST_PHOTO_ACCESS_TOKEN=*****************************<\/strong>\r\n<strong>LINE_POST_PHOTO_SECRET=****************<\/strong><\/pre>\n<p>\u203b \u30a2\u30af\u30bb\u30b9\u30c8\u30fc\u30af\u30f3\u306f\u9577\u30fc\u3044\u6587\u5b57\u5217\u3067\u3057\u305f<\/p>\n<h1>\u30a6\u30a7\u30d6\u30d5\u30c3\u30af\u3092\u6709\u52b9\u306b\u3059\u308b<\/h1>\n<p>\u307e\u305f\u3001\u4eca\u56de\u306f\u300c<strong>\u30a6\u30a7\u30d6\u30d5\u30c3\u30af<\/strong>\uff08\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u53d7\u4fe1\u3057\u305f\u3089\u3001\u305d\u306e\u5185\u5bb9\u3092\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u5074\u306b\u9001\u4fe1\u3057\u3066\u304f\u308c\u308b\u6a5f\u80fd\uff09\u300d\u3092\u6709\u52b9\u306b\u3057\u3066\u304a\u304f\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u300c<strong>\u30b3\u30f3\u30bd\u30fc\u30eb \u2192 Messaging API\u8a2d\u5b9a<\/strong>\u300d\u3078\u79fb\u52d5\u3057\u3066URL\u3092\u5165\u529b\u3057\u307e\u3059\u3002<br \/>\n\u306a\u304a\u3001\u4eca\u56de\u306f\u300c<strong>https:\/\/*******\/line_webhook\/post_photo<\/strong>\u300d\u306b\u8a2d\u5b9a\u3057\u3001\u300c<strong>Webhook\u306e\u5229\u7528<\/strong>\u300d\u306b\u30c1\u30a7\u30c3\u30af\u3092\u3044\u308c\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12175\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/11\/line_messaging_api_report_system_6.png\" alt=\"\" width=\"640\" height=\"220\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/11\/line_messaging_api_report_system_6.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/11\/line_messaging_api_report_system_6-300x103.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u306a\u304a\u3001\u30ed\u30fc\u30ab\u30eb\u3067\u30a6\u30a7\u30d6\u30d5\u30c3\u30af\u3092\u958b\u767a\u3059\u308b\u5834\u5408\u3001<code>ngrok<\/code>\uff08\u3048\u3093\u3050\u308d\u3063\u304f\uff09\u304c\u3081\u3061\u3083\u304f\u3061\u3083\u4fbf\u5229\u3067\u3059\u3002<code>ngrok<\/code>\u306b\u3064\u3044\u3066\u306f\u300c<strong><a href=\"#about_ngrok\">\u304a\u307e\u3051\uff1a ngrok \u306b\u3064\u3044\u3066<\/a><\/strong>\u300d\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u3082\u3057<code>ngrok<\/code>\u306e<code>URL<\/code>\u3092\u30bb\u30c3\u30c8\u3059\u308b\u5834\u5408\u306f\u300c<strong>https:\/\/****-***-***-***-***.ngrok-free.app\/line_webhook\/post_photo<\/strong>\u300d\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u305d\u3057\u3066\u3001\u5fd8\u308c\u3066\u306f\u3044\u3051\u306a\u3044\u306e\u304c<code>Laravel<\/code>\u306e<code>Csrf<\/code>\u30c8\u30fc\u30af\u30f3\u30c1\u30a7\u30c3\u30af\u306e\u89e3\u9664\u3067\u3059\u3002<\/p>\n<p>\u300c<code>CSRF<\/code>\u30c8\u30fc\u30af\u30f3\u30c1\u30a7\u30c3\u30af\u300d\u306f\u3001\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u5411\u4e0a\u306e\u305f\u3081<code>Laravel<\/code>\u3067\u306f\u6a19\u6e96\u642d\u8f09\u3055\u308c\u3066\u3044\u307e\u3059\u304c\u3001\u30a6\u30a7\u30d6\u30d5\u30c3\u30af\u306b\u306f\u305d\u306e\u30c8\u30fc\u30af\u30f3\u3092\u542b\u3081\u308b\u3053\u3068\u304c\u3067\u304d\u306a\u3044\u306e\u3067\u3001\u30a6\u30a7\u30d6\u30d5\u30c3\u30af\u306e<code>URL<\/code>\u3060\u3051\u306f\u3053\u306e\u30c1\u30a7\u30c3\u30af\u3092\u5916\u3057\u3066\u304a\u304f\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p><strong>app\/Http\/Middleware\/VerifyCsrfToken.php<\/strong><\/p>\n<div>\n<pre>&lt;?php\r\n\r\nnamespace App\\Http\\Middleware;\r\n\r\nuse Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken as Middleware;\r\n\r\nclass VerifyCsrfToken extends Middleware\r\n{\r\n    \/**\r\n     * The URIs that should be excluded from CSRF verification.\r\n     *\r\n     * @var array&lt;int, string&gt;\r\n     *\/\r\n    protected $except = [\r\n        <strong>'line_webhook\/*', \/\/ \ud83d\udc48 \u3053\u3053\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f<\/strong>\r\n    ];\r\n}<\/pre>\n<h1>\u5fdc\u7b54\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u7121\u52b9\u306b\u3059\u308b<\/h1>\n<p>\u521d\u671f\u72b6\u614b\u3067LINE Messaging API\u306f\u81ea\u52d5\u3067\u56fa\u5b9a\u3055\u308c\u305f\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u8fd4\u4fe1\u3059\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u304c\u3001\u3053\u308c\u306f\u4e0d\u8981\u306a\u306e\u3067\u7121\u52b9\u306b\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<\/div>\n<\/div>\n<p>\u300c<strong>\u30b3\u30f3\u30bd\u30fc\u30eb \u2192 Messaging API\u8a2d\u5b9a<\/strong>\u300d\u306e\u300c\u5fdc\u7b54\u30e1\u30c3\u30bb\u30fc\u30b8\u300d\u3068\u66f8\u304b\u308c\u3066\u3044\u308b\u5834\u6240\u306b\u3042\u308b\u300c\u7de8\u96c6\u300d\u30ea\u30f3\u30af\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12178\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/11\/line_messaging_api_report_system_7.png\" alt=\"\" width=\"270\" height=\"74\" \/><\/p>\n<p>\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30c1\u30a7\u30c3\u30af\u30dc\u30c3\u30af\u30b9\u304c\u8868\u793a\u3055\u308c\u308b\u306e\u3067 <strong>Webhook \u4ee5\u5916\u3092\u7121\u52b9<\/strong>\u306b\u3057\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12179\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/11\/line_messaging_api_report_system_8.png\" alt=\"\" width=\"575\" height=\"458\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/11\/line_messaging_api_report_system_8.png 575w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/11\/line_messaging_api_report_system_8-300x239.png 300w\" sizes=\"auto, (max-width: 575px) 100vw, 575px\" \/><\/p>\n<div>\n<div>\n<p>\u3053\u308c\u3067<code>LINE Developer<\/code>\u3067\u306e\u4f5c\u696d\u306f\u5b8c\u4e86\u3067\u3059\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<h1>\u30e2\u30c7\u30eb\uff06\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u3092\u3064\u304f\u308b<\/h1>\n<p>\u3067\u306f\u3001\u3053\u3053\u304b\u3089\u306f\u30e1\u30a4\u30f3\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u90e8\u5206\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n\u307e\u305a\u306f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u5468\u308a\u304b\u3089\u4f5c\u3063\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div>\n<pre><strong>php artisan make:model UserPost -m<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u3001\u30e2\u30c7\u30eb\u3068\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u306e\u30d5\u30a1\u30a4\u30eb\uff12\u3064\u304c\u4f5c\u6210\u3055\u308c\u308b\u306e\u3067\u3001\u4e2d\u8eab\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<p><strong>app\/Models\/UserPost.php<\/strong><\/p>\n<\/div>\n<\/div>\n<div>\n<pre>&lt;?php\r\n\r\nnamespace App\\Models;\r\n\r\nuse Illuminate\\Database\\Eloquent\\Factories\\HasFactory;\r\nuse Illuminate\\Database\\Eloquent\\Model;\r\n\r\nclass UserPost extends Model\r\n{\r\n    use HasFactory;\r\n\r\n<strong>    protected $appends = [<\/strong>\r\n<strong>        'file_path',<\/strong>\r\n<strong>    ];<\/strong>\r\n\r\n<strong>    \/\/ Accessor<\/strong>\r\n<strong>    public function getFilePathAttribute()<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        return storage_path('app\/public\/post_photos\/' . $this-&gt;filename);<\/strong>\r\n<strong>    }<\/strong>\r\n}<\/pre>\n<\/div>\n<div>\n<p><strong>database\/migrations\/****_**_**_******_create_user_posts_table.php<\/strong><\/p>\n<\/div>\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        <strong>Schema::create('user_posts', function (Blueprint $table) {<\/strong>\r\n<strong>            $table-&gt;id();<\/strong>\r\n<strong>            $table-&gt;string('line_user_id')-&gt;comment('LINE \u30e6\u30fc\u30b6\u30fc ID');<\/strong>\r\n<strong>            $table-&gt;string('filename')-&gt;comment('\u30d5\u30a1\u30a4\u30eb\u540d');<\/strong>\r\n<strong>            $table-&gt;double('latitude', 9, 6)-&gt;nullable()-&gt;comment('\u7def\u5ea6');<\/strong>\r\n<strong>            $table-&gt;double('longitude', 9, 6)-&gt;nullable()-&gt;comment('\u7d4c\u5ea6');<\/strong>\r\n<strong>            $table-&gt;timestamps();<\/strong>\r\n<strong>        });<\/strong>\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('user_posts');\r\n    }\r\n};<\/pre>\n<\/div>\n<\/div>\n<p>\u3067\u306f\u3001\u3053\u306e\u72b6\u614b\u3067\u30c6\u30fc\u30d6\u30eb\u3092\u8ffd\u52a0\u3057\u3066\u307f\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<\/div>\n<div>\n<pre><strong>php artisan migrate<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u3001\u5b9f\u969b\u306e\u30c6\u30fc\u30d6\u306f\u3053\u3046\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12182\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/11\/line_messaging_api_report_system_9.png\" alt=\"\" width=\"415\" height=\"309\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/11\/line_messaging_api_report_system_9.png 415w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/11\/line_messaging_api_report_system_9-300x223.png 300w\" sizes=\"auto, (max-width: 415px) 100vw, 415px\" \/><\/p>\n<h1>\u30e1\u30fc\u30eb\u9001\u4fe1\u90e8\u5206\u3092\u3064\u304f\u308b<\/h1>\n<p>\u305d\u3057\u3066\u3001\u5f8c\u3067\u4f7f\u3046\u3053\u3068\u306b\u306a\u308b\u30e1\u30fc\u30eb\u9001\u4fe1\u90e8\u5206\u3092\u3064\u304f\u3063\u3066\u304a\u304d\u307e\u3059\u3002<br \/>\n\u30e1\u30fc\u30eb\u3092\u9001\u4fe1\u3059\u308b\u306e\u306f\u300c<strong>\u5199\u771f\uff06\u4f4d\u7f6e\u60c5\u5831\u306e\u6295\u7a3f\u304c\u5b8c\u4e86\u3057\u305f\u3068\u304d<\/strong>\u300d\u3067\u3059\u3002<\/p>\n<p>\u3067\u306f\u3001\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 make:mail UserPosted<\/strong><\/pre>\n<\/div>\n<\/div>\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\/Mail\/UserPosted.php<\/strong><\/p>\n<div>\n<pre><strong>&lt;?php<\/strong>\r\n\r\n<strong>namespace App\\Mail;<\/strong>\r\n\r\n<strong>use App\\Models\\UserPost;<\/strong>\r\n<strong>use Illuminate\\Bus\\Queueable;<\/strong>\r\n<strong>use Illuminate\\Contracts\\Queue\\ShouldQueue;<\/strong>\r\n<strong>use Illuminate\\Mail\\Mailable;<\/strong>\r\n<strong>use Illuminate\\Mail\\Mailables\\Attachment;<\/strong>\r\n<strong>use Illuminate\\Mail\\Mailables\\Content;<\/strong>\r\n<strong>use Illuminate\\Mail\\Mailables\\Envelope;<\/strong>\r\n<strong>use Illuminate\\Queue\\SerializesModels;<\/strong>\r\n\r\n<strong>class UserPosted extends Mailable<\/strong>\r\n<strong>{<\/strong>\r\n<strong>    use Queueable, SerializesModels;<\/strong>\r\n\r\n<strong>    \/**<\/strong>\r\n<strong>     * Create a new message instance.<\/strong>\r\n<strong>     *\/<\/strong>\r\n<strong>    public function __construct(private UserPost $user_post)<\/strong>\r\n<strong>    {}<\/strong>\r\n\r\n<strong>    \/**<\/strong>\r\n<strong>     * Get the message envelope.<\/strong>\r\n<strong>     *\/<\/strong>\r\n<strong>    public function envelope(): Envelope<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        $from = 'no-reply@example.com';<\/strong>\r\n\r\n<strong>        return new Envelope(<\/strong>\r\n<strong>            from: $from,<\/strong>\r\n<strong>            subject: '\u30e6\u30fc\u30b6\u30fc\u304b\u3089\u5199\u771f\uff06\u4f4d\u7f6e\u60c5\u5831\u306e\u6295\u7a3f\u304c\u3042\u308a\u307e\u3057\u305f',<\/strong>\r\n<strong>        );<\/strong>\r\n<strong>    }<\/strong>\r\n\r\n<strong>    \/**<\/strong>\r\n<strong>     * Get the message content definition.<\/strong>\r\n<strong>     *\/<\/strong>\r\n<strong>    public function content(): Content<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        $latitude = $this-&gt;user_post-&gt;latitude;<\/strong>\r\n<strong>        $longitude = $this-&gt;user_post-&gt;longitude;<\/strong>\r\n<strong>        $google_maps_url = 'https:\/\/maps.google.com\/maps?z=15&amp;t=k&amp;q=loc:'. urlencode($latitude .','. $longitude);<\/strong>\r\n\r\n<strong>        return new Content(<\/strong>\r\n<strong>            view: 'emails.user_posted',<\/strong>\r\n<strong>            with: [<\/strong>\r\n<strong>                'latitude' =&gt; $latitude,<\/strong>\r\n<strong>                'longitude' =&gt; $longitude,<\/strong>\r\n<strong>                'google_maps_url' =&gt; $google_maps_url<\/strong>\r\n<strong>            ]<\/strong>\r\n<strong>        );<\/strong>\r\n<strong>    }<\/strong>\r\n\r\n<strong>    \/**<\/strong>\r\n<strong>     * Get the attachments for the message.<\/strong>\r\n<strong>     *<\/strong>\r\n<strong>     * @return array&lt;int, \\Illuminate\\Mail\\Mailables\\Attachment&gt;<\/strong>\r\n<strong>     *\/<\/strong>\r\n<strong>    public function attachments(): array<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        return [<\/strong>\r\n<strong>            Attachment::fromPath($this-&gt;user_post-&gt;file_path),<\/strong>\r\n<strong>        ];<\/strong>\r\n<strong>    }<\/strong>\r\n<strong>}<\/strong><\/pre>\n<\/div>\n<p>\u305d\u3057\u3066\u3001\u30e1\u30fc\u30eb\u6587\u9762\u306e\u30d3\u30e5\u30fc\u3082\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<div>\n<pre><strong>php artisan make:view emails.user_posted<\/strong><\/pre>\n<p>\u4e2d\u8eab\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><strong>resources\/views\/emails\/user_posted.blade.php<\/strong><\/p>\n<\/div>\n<div>\n<pre><strong>\u30e6\u30fc\u30b6\u30fc\u3055\u3093\u304c\u5199\u771f\uff06\u4f4d\u7f6e\u60c5\u5831\u3092\u9001\u3063\u3066\u304f\u308c\u307e\u3057\u305f\u3002&lt;br&gt;<\/strong>\r\n\r\n<strong>\u611f\u8b1d\u3057\u3066\u30c1\u30a7\u30c3\u30af\u3059\u308b\u3088\u3046\u306b\uff01&lt;br&gt;&lt;br&gt;<\/strong>\r\n\r\n<strong>\u5730\u56f3\u30ea\u30f3\u30af\uff1a &lt;a href=\"{{ $google_maps_url }}\" target=\"_blank\"&gt;{{ $longitude }},{{ $latitude }}&lt;\/a&gt;<\/strong><\/pre>\n<\/div>\n<div>\n<h1>\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3092\u3064\u304f\u308b<\/h1>\n<p>\u6b21\u306b\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3092\u4f5c\u6210\u3059\u308b\u306e\u3067\u3001\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 make:controller LinePostPhotoWebhookController<\/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<\/div>\n<\/div>\n<p><strong>app\/Http\/Controllers\/LinePostPhotoWebhookController.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\\Mail\\UserPosted;<\/strong>\r\n<strong>use App\\Models\\UserPost;<\/strong>\r\n<strong>use Illuminate\\Http\\Request;<\/strong>\r\n<strong>use GuzzleHttp\\Client as GuzzleClient;<\/strong>\r\n<strong>use Illuminate\\Support\\Facades\\Mail;<\/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\\Api\\MessagingApiBlobApi;<\/strong>\r\n<strong>use LINE\\Clients\\MessagingApi\\Model\\ReplyMessageRequest;<\/strong>\r\n<strong>use LINE\\Clients\\MessagingApi\\Model\\LocationAction;<\/strong>\r\n<strong>use LINE\\Clients\\MessagingApi\\Model\\QuickReply;<\/strong>\r\n<strong>use LINE\\Clients\\MessagingApi\\Model\\QuickReplyItem;<\/strong>\r\n<strong>use LINE\\Clients\\MessagingApi\\Model\\TextMessage;<\/strong>\r\n<strong>use LINE\\Parser\\EventRequestParser;<\/strong>\r\n<strong>use LINE\\Webhook\\Model\\MessageEvent;<\/strong>\r\n<strong>use LINE\\Webhook\\Model\\ImageMessageContent;<\/strong>\r\n<strong>use LINE\\Webhook\\Model\\LocationMessageContent;<\/strong>\r\n<strong>use LINE\\Webhook\\Model\\FollowEvent;<\/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\r\n<strong>class LinePostPhotoWebhookController extends Controller<\/strong>\r\n<strong>{<\/strong>\r\n<strong>    const EXPIRATION_MINUTES = 30; \/\/ \u753b\u50cf\u304c\u9001\u4fe1\u3055\u308c\u3066\u304b\u3089\u4f4d\u7f6e\u60c5\u5831\u304c\u9001\u4fe1\u3055\u308c\u308b\u307e\u3067\u306e\u6709\u52b9\u6642\u9593\uff08\u5206\uff09<\/strong>\r\n\r\n<strong>    private $api = null;<\/strong>\r\n<strong>    private $blob_api = null;<\/strong>\r\n\r\n<strong>    public function __construct()<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        \/\/ \u2193\u2193\u2193 \u672c\u6765\u306f config\/services.php \u304b\u3089\u53d6\u5f97\u3059\u308b\u3079\u304d\u3067\u3059<\/strong>\r\n<strong>        $this-&gt;channel_secret = env('LINE_POST_PHOTO_SECRET');<\/strong>\r\n<strong>        $this-&gt;access_token = env('LINE_POST_PHOTO_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<strong>            $this-&gt;blob_api = new MessagingApiBlobApi(<\/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>                    if($event instanceof FollowEvent) { \/\/ \u304a\u53cb\u9054\u306e\u767b\u9332\u3057\u305f\u3068\u304d<\/strong>\r\n\r\n<strong>                        $this-&gt;followEvent($event);<\/strong>\r\n\r\n<strong>                    } else if ($event instanceof MessageEvent) { \/\/ \u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u53d7\u4fe1\u3057\u305f\u3068\u304d<\/strong>\r\n\r\n<strong>                        $message = $event-&gt;getMessage();<\/strong>\r\n\r\n<strong>                        if ($message instanceof ImageMessageContent) { \/\/ \u5199\u771f\u304c\u9001\u4fe1\u3055\u308c\u305f\u3068\u304d<\/strong>\r\n\r\n<strong>                            $this-&gt;imageMessageEvent($event, $message);<\/strong>\r\n\r\n<strong>                        } else if ($message instanceof LocationMessageContent) { \/\/ \u4f4d\u7f6e\u60c5\u5831\u304c\u9001\u4fe1\u3055\u308c\u305f\u3068\u304d<\/strong>\r\n\r\n<strong>                            $this-&gt;locationMessageEvent($event, $message);<\/strong>\r\n\r\n<strong>                        }<\/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>    \/\/ \u30a4\u30d9\u30f3\u30c8<\/strong>\r\n<strong>    private function followEvent(FollowEvent $event) \/\/ \u304a\u53cb\u9054\u767b\u306b\u306a\u3063\u305f\u3068\u304d<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        $reply_token = $event-&gt;getReplyToken();<\/strong>\r\n<strong>        $text = \"\u5199\u771f\u6295\u7a3f\u30b5\u30fc\u30d3\u30b9\u306b\u767b\u9332\u3057\u3066\u3044\u305f\u3060\u3044\u3066\u3042\u308a\u304c\u3068\u3046\u3054\u3056\u3044\u307e\u3059\uff01\\n\\n\u5199\u771f\u3092\u9001\u4fe1\u3059\u308b\u3068\u4f4d\u7f6e\u60c5\u5831\u304c\u9078\u629e\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u3001\u5199\u771f\u3068\u4f4d\u7f6e\u60c5\u5831\u304c\uff12\u3064\u63c3\u3063\u305f\u6642\u70b9\u3067\u6295\u7a3f\u304c\u5b8c\u4e86\u3057\u307e\u3059\u3002\\n\\n\u305c\u3072\u3088\u308d\u3057\u304f\u304a\u9858\u3044\u3044\u305f\u3057\u307e\u3059\uff01\";<\/strong>\r\n\r\n<strong>        $this-&gt;replyTextMessage($text, $reply_token);<\/strong>\r\n<strong>    }<\/strong>\r\n\r\n<strong>    private function imageMessageEvent(MessageEvent $event, ImageMessageContent $message) \/\/ \u5199\u771f\u304c\u9001\u4fe1\u3055\u308c\u305f\u3068\u304d<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        $message_id = $message-&gt;getId();<\/strong>\r\n<strong>        $sfo = $this-&gt;blob_api-&gt;getMessageContent($message_id);<\/strong>\r\n<strong>        $image_data = $sfo-&gt;fread($sfo-&gt;getSize());<\/strong>\r\n\r\n<strong>        if($image_data) {<\/strong>\r\n\r\n<strong>            $filename = Str::uuid() .'.jpg';<\/strong>\r\n<strong>            $save_dir = storage_path('app\/public\/post_photos');<\/strong>\r\n\r\n<strong>            if(! file_exists($save_dir)) {<\/strong>\r\n\r\n<strong>                mkdir($save_dir, 0777, true); \/\/ \u30d5\u30a9\u30eb\u30c0\u304c\u306a\u3051\u308c\u3070\u4f5c\u6210<\/strong>\r\n\r\n<strong>            };<\/strong>\r\n\r\n<strong>            file_put_contents($save_dir .'\/'. $filename, $image_data);<\/strong>\r\n\r\n<strong>            \/\/ \u753b\u50cf\u306e\u5834\u5408\u306f\u5fc5\u305a\u65b0\u898f\u4f5c\u6210<\/strong>\r\n<strong>            $line_user_id = $this-&gt;getLineUserId($event);<\/strong>\r\n<strong>            $user_post = new UserPost;<\/strong>\r\n<strong>            $user_post-&gt;line_user_id = $line_user_id;<\/strong>\r\n<strong>            $user_post-&gt;filename = $filename;<\/strong>\r\n<strong>            $user_post-&gt;save();<\/strong>\r\n\r\n<strong>            $this-&gt;quickReplyForLocation($event);<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n<strong>    }<\/strong>\r\n\r\n<strong>    private function locationMessageEvent(MessageEvent $event, LocationMessageContent $message) \/\/ \u4f4d\u7f6e\u60c5\u5831\u304c\u9001\u4fe1\u3055\u308c\u305f\u3068\u304d<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        $line_user_id = $this-&gt;getLineUserId($event);<\/strong>\r\n<strong>        $reply_token = $event-&gt;getReplyToken();<\/strong>\r\n<strong>        $base_dt = now()-&gt;subMinutes(self::EXPIRATION_MINUTES);<\/strong>\r\n\r\n<strong>        \/\/ \u4f4d\u7f6e\u60c5\u5831\u306e\u5834\u5408\u306f\u3001\u6700\u65b0\u306e\u6295\u7a3f\u3092\u53d6\u5f97\u3057\u3066\u66f4\u65b0\u3059\u308b<\/strong>\r\n<strong>        $user_post = UserPost::query()<\/strong>\r\n<strong>            -&gt;where('line_user_id', $line_user_id)<\/strong>\r\n<strong>            -&gt;whereNull('latitude')<\/strong>\r\n<strong>            -&gt;whereNull('longitude')<\/strong>\r\n<strong>            -&gt;where('created_at', '&gt;=', $base_dt) \/\/ \u6709\u52b9\u671f\u9650\u5185\u306e\u3082\u306e\u3092\u5bfe\u8c61<\/strong>\r\n<strong>            -&gt;orderBy('created_at', 'desc')<\/strong>\r\n<strong>            -&gt;first();<\/strong>\r\n\r\n<strong>        if(! is_null($user_post)) {<\/strong>\r\n\r\n<strong>            $user_post-&gt;latitude = $message-&gt;getLatitude();<\/strong>\r\n<strong>            $user_post-&gt;longitude = $message-&gt;getLongitude();<\/strong>\r\n<strong>            $user_post-&gt;save();<\/strong>\r\n\r\n<strong>            $text = \"\u4f4d\u7f6e\u60c5\u5831\u304c\u9001\u4fe1\u3055\u308c\u307e\u3057\u305f\u3002\\n\\n\u5199\u771f\u3068\u4f4d\u7f6e\u60c5\u5831\u304c\u63c3\u3044\u307e\u3057\u305f\u306e\u3067\u3001\u6295\u7a3f\u304c\u5b8c\u4e86\u3057\u307e\u3057\u305f\u3002\\n\\n\u3042\u308a\u304c\u3068\u3046\u3054\u3056\u3044\u307e\u3057\u305f\uff01\";<\/strong>\r\n<strong>            $this-&gt;replyTextMessage($text, $reply_token);<\/strong>\r\n\r\n<strong>            $this-&gt;sendEmailToAdmin($user_post); \/\/ \u7ba1\u7406\u8005\u306b\u30e1\u30fc\u30eb\u3092\u9001\u4fe1<\/strong>\r\n\r\n<strong>        } else {<\/strong>\r\n\r\n<strong>            \/\/ \u30db\u30f3\u30c8\u306f\u3053\u3053\u3067\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u8fd4\u4fe1\uff08\u7701\u7565\uff09<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n<strong>    }<\/strong>\r\n\r\n<strong>    \/\/ \u305d\u306e\u4ed6<\/strong>\r\n<strong>    private function getLineUserId(MessageEvent $event)<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        $source = $event-&gt;getSource();<\/strong>\r\n\r\n<strong>        return $source-&gt;getUserId();<\/strong>\r\n<strong>    }<\/strong>\r\n\r\n<strong>    private function replyTextMessage(string $text, string $reply_token) \/\/ \u30c6\u30ad\u30b9\u30c8\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u8fd4\u4fe1<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        $text_message = new TextMessage(['text' =&gt; $text]);<\/strong>\r\n\r\n<strong>        $this-&gt;api-&gt;replyMessage(new ReplyMessageRequest([<\/strong>\r\n<strong>            'replyToken' =&gt; $reply_token,<\/strong>\r\n<strong>            'messages' =&gt; [<\/strong>\r\n<strong>                $text_message-&gt;setType('text'),<\/strong>\r\n<strong>            ],<\/strong>\r\n<strong>        ]));<\/strong>\r\n<strong>    }<\/strong>\r\n\r\n<strong>    private function quickReplyForLocation(MessageEvent $event)<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        $reply_token = $event-&gt;getReplyToken();<\/strong>\r\n<strong>        $quick_reply = new QuickReply([<\/strong>\r\n<strong>            'items' =&gt; [<\/strong>\r\n<strong>                new QuickReplyItem([<\/strong>\r\n<strong>                    'type' =&gt; 'action',<\/strong>\r\n<strong>                    'action' =&gt; new LocationAction([<\/strong>\r\n<strong>                        'type' =&gt; ActionType::LOCATION,<\/strong>\r\n<strong>                        'label' =&gt; '\u4f4d\u7f6e\u60c5\u5831\u3092\u9001\u4fe1\u3059\u308b',<\/strong>\r\n<strong>                    ]),<\/strong>\r\n<strong>                ]),<\/strong>\r\n<strong>            ]<\/strong>\r\n<strong>        ]);<\/strong>\r\n\r\n<strong>        $text_message = new TextMessage([<\/strong>\r\n<strong>            'text' =&gt; '\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u4f4d\u7f6e\u60c5\u5831\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\uff08\u6709\u52b9\u6642\u9593\u306f'. self::EXPIRATION_MINUTES .'\u5206\u3067\u3059\uff09',<\/strong>\r\n<strong>            'type' =&gt; MessageType::TEXT,<\/strong>\r\n<strong>            'quickReply' =&gt; $quick_reply,<\/strong>\r\n<strong>        ]);<\/strong>\r\n<strong>        $this-&gt;api-&gt;replyMessage(new ReplyMessageRequest([<\/strong>\r\n<strong>            'replyToken' =&gt; $reply_token,<\/strong>\r\n<strong>            'messages' =&gt; [<\/strong>\r\n<strong>                $text_message-&gt;setType('text'),<\/strong>\r\n<strong>            ],<\/strong>\r\n<strong>        ]));<\/strong>\r\n<strong>    }<\/strong>\r\n\r\n<strong>    private function sendEmailToAdmin(UserPost $user_post)<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        $to = 'admin@example.com';<\/strong>\r\n\r\n<strong>        Mail::to($to)-&gt;send(new UserPosted($user_post));<\/strong>\r\n<strong>    }<\/strong>\r\n<strong>}<\/strong><\/pre>\n<p>\u3061\u306a\u307f\u306b\u3001\u4eca\u56de\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u30d1\u30c3\u30b1\u30fc\u30b8\u300c<strong>linecorp\/line-bot-sdk<\/strong>\u300d\u306f\u30d0\u30fc\u30b8\u30e7\u30f3<code>9.3<\/code>\u306b\u306a\u3063\u3066\u3044\u305f\u306e\u3067\u3059\u304c\u3001\u3069\u3046\u3084\u3089\u4ee5\u524d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304b\u3089\u306f\u5909\u66f4\u3055\u308c\u3066\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3057\u305f\u3002<\/p>\n<\/div>\n<ul>\n<li>\u4ee5\u524d\u306e\u30e1\u30bd\u30c3\u30c9\u540d\u3084\u305d\u3082\u305d\u3082\u5225\u30af\u30e9\u30b9\u3067\u547c\u3073\u51fa\u3055\u306a\u3044\u3068\u3044\u3051\u306a\u304f\u306a\u3063\u3066\u3057\u307e\u3063\u305f\u305f\u3081\u3001\u6614\u306e\u30b3\u30fc\u30c9\u304c\u4f7f\u3048\u306a\u3044\u2026\ud83d\ude2b<\/li>\n<li>\u3057\u304b\u3082\u3001\u65b0\u3057\u3044\u66f8\u304d\u65b9\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u306f\u307e\u3060\u307b\u3068\u3093\u3069\u306a\u3044\u2026\ud83d\ude2b<\/li>\n<\/ul>\n<p>\u4e00\u500b\u4e00\u500b\u8fd4\u308a\u5024\u306e\u4e2d\u8eab\u3092<code>logger()<\/code>\u3067\u51fa\u3057\u3066\u30c1\u30a7\u30c3\u30af\u3059\u308b\u306a\u3069\u3001\u3061\u3087\u3063\u3068\u8abf\u3079\u308b\u306e\u305f\u3044\u3078\u3093\u3067\u3057\u305f\uff08\u7b11\uff09<\/p>\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\\LinePostPhotoWebhookController;<\/strong>\r\n\r\n<strong>\/\/ \u7701\u7565<\/strong>\r\n\r\n<strong>Route::post('line_webhook\/post_photo', [LinePostPhotoWebhookController::class, 'receive']);<\/strong><\/pre>\n<\/div>\n<p>\u306a\u304a\u3001\u3053\u308c\u3067\u4f5c\u696d\u306f\u5b8c\u4e86\u3067\u3059\u3002<br \/>\n\u304a\u75b2\u308c\u69d8\u3067\u3057\u305f\u3002\ud83d\ude04\ud83d\udc4d\u2728<\/p>\n<h1>\u30c6\u30b9\u30c8\u3057\u3066\u307f\u308b<\/h1>\n<p>\u3067\u306f\u5b9f\u969b\u306b\u30c6\u30b9\u30c8\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u2757<\/p>\n<p>\u307e\u305a\u3001<code>Line Developers<\/code>\u3067\u4f5c\u6210\u3057\u305f\u30c1\u30e3\u30cd\u30eb\u306b\u8868\u793a\u3055\u308c\u3066\u3044\u308bQR\u30b3\u30fc\u30c9\u3092<code>LINE<\/code>\u3067\u8aad\u307f\u8fbc\u3093\u3067\u304a\u53cb\u9054\u767b\u9332\u3057\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12185\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/11\/line_messaging_api_report_system_14.png\" alt=\"\" width=\"350\" height=\"396\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/11\/line_messaging_api_report_system_14.png 350w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/11\/line_messaging_api_report_system_14-265x300.png 265w\" sizes=\"auto, (max-width: 350px) 100vw, 350px\" \/><\/p>\n<p>\u3059\u308b\u3068\u3001\u81ea\u52d5\u3067\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8fd4\u4fe1\u304c\u3042\u308a\u307e\u3057\u305f\u3002<br \/>\n\u307e\u305a\u306f\u6210\u529f\u3067\u3059\ud83d\ude04<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12186\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/11\/line_messaging_api_report_system_13.png\" alt=\"\" width=\"500\" height=\"371\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/11\/line_messaging_api_report_system_13.png 500w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/11\/line_messaging_api_report_system_13-300x223.png 300w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/p>\n<p>\u3067\u306f\u3001\u7d9a\u3044\u3066\u5199\u771f\u3092\u9001\u4fe1\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002\uff08\u5148\u65e5\u3001\u53f0\u6e7e\u304b\u3089\u6765\u305f\u30af\u30e9\u30b9\u30e1\u30fc\u30c8\u306b\u4f1a\u3063\u305f\u3068\u304d\u306e\u4eac\u90fd\u30bf\u30ef\u30fc\u3067\u3059\u3002\u5e7b\u60f3\u7684\u3067\u3057\u305f\ud83d\udc4d\uff09<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12188\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/11\/line_messaging_api_report_system_11.png\" alt=\"\" width=\"500\" height=\"710\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/11\/line_messaging_api_report_system_11.png 500w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/11\/line_messaging_api_report_system_11-211x300.png 211w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/p>\n<p>\u3059\u308b\u3068\u3001\u3053\u308c\u306b\u3082\u81ea\u52d5\u3067\u8fd4\u4fe1\u304c\u3042\u308a\u3001\u4f4d\u7f6e\u60c5\u5831\u306e\u767b\u9332\u3092\u4fc3\u3059\u30dc\u30bf\u30f3\u304c\u8868\u793a\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<p>\u305d\u3053\u3067\u3001\u3053\u306e\u30dc\u30bf\u30f3\u3092\u30bf\u30c3\u30d7\u3057\u3066\u4f4d\u7f6e\u60c5\u5831\u3092\u9001\u4fe1\u3057\u3066\u307f\u308b\u3068\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12187\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/11\/line_messaging_api_report_system_12.png\" alt=\"\" width=\"500\" height=\"571\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/11\/line_messaging_api_report_system_12.png 500w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/11\/line_messaging_api_report_system_12-263x300.png 263w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/p>\n<p>\u306f\u3044\u2757<br \/>\n\u5b8c\u4e86\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u3068\u3069\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>\u3053\u3053\u307e\u3067\u306f\u6210\u529f\u3067\u3059\ud83d\ude04\u2728<\/p>\n<p>\u3067\u306f\u3001\u30e1\u30fc\u30eb\u304c\u5c4a\u3044\u3066\u3044\u308b\u304b\u30c1\u30a7\u30c3\u30af\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u3069\u3046\u306a\u3063\u305f\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-12183\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/11\/line_messaging_api_report_system_10.png\" alt=\"\" width=\"449\" height=\"263\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/11\/line_messaging_api_report_system_10.png 449w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/11\/line_messaging_api_report_system_10-300x176.png 300w\" sizes=\"auto, (max-width: 449px) 100vw, 449px\" \/><\/p>\n<p>\u306f\u3044\u2757<br \/>\n\u3046\u307e\u304f\u30e1\u30fc\u30eb\u3067\u753b\u50cf\uff06\u4f4d\u7f6e\u60c5\u5831\u304c\u9001\u4fe1\u3055\u308c\u3066\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>\u3059\u3079\u3066\u6210\u529f\u3067\u3059\u3002\u2728\ud83d\ude04\ud83d\udc4d<\/p>\n<h1 id=\"about_ngrok\">\u304a\u307e\u3051\uff1a ngrok \u306b\u3064\u3044\u3066<\/h1>\n<p><code>ngrok<\/code>\u306f\u3044\u308f\u3086\u308b\u300c<strong>\u30c8\u30f3\u30cd\u30eb<\/strong>\u300d\u304c\u3067\u304d\u308b\u30b5\u30fc\u30d3\u30b9\u3067\u3001\u4ee5\u4e0b\u306e\u6d41\u308c\u3067<strong>\u30ed\u30fc\u30ab\u30eb\u74b0\u5883\u306a\u306e\u306b\u3001\u30a6\u30a7\u30d6\u30d5\u30c3\u30af\u304c\u53d7\u4fe1\u3067\u304d\u308b<\/strong>\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<ol>\n<li>LINE \u306b\u53d7\u4fe1\u304c\u3042\u308b<\/li>\n<li>LINE \u304c\u30a6\u30a7\u30d6\u30d5\u30c3\u30af\u3092\uff08ngrok \u3078\uff09\u9001\u4fe1<\/li>\n<li>ngrok \u304c\u3044\u3044\u30ab\u30f3\u30b8\u306b\u30a6\u30a7\u30d6\u30d5\u30c3\u30af\u306e\u5185\u5bb9\u3092\u30ed\u30fc\u30ab\u30eb\u3078\u9001\u4fe1<\/li>\n<li>\u64ec\u4f3c\u7684\u306b\u30a6\u30a7\u30d6\u30d5\u30c3\u30af\u3092\u53d7\u3051\u53d6\u308b\u3053\u3068\u304c\u3067\u304d\u308b<\/li>\n<\/ol>\n<p>\u3057\u304b\u3082<code>HTTP<\/code>\u30ea\u30af\u30a8\u30b9\u30c8\u304c<strong>\u6708\u9593 100,000 \u56de\u307e\u3067\u7121\u6599<\/strong>\u3068\u3044\u3046\u958b\u767a\u7528\u306a\u3089\u307b\u307c\u7121\u6599\u3067\u3044\u3051\u308b\u3068\u3044\u3046\u592a\u3063\u8179\u3067\u3059\u3002\uff082023.11.17 \u73fe\u5728\uff09<\/p>\n<p>\u79c1\u306f<code>Linux<\/code>\u3092\u4f7f\u3063\u3066\u3044\u308b\u95a2\u4fc2\u4e0a\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u65b9\u6cd5\u306f\u3053\u3053\u3067\u306f\u3054\u7d39\u4ecb\u3057\u307e\u305b\u3093\u304c\u3001\u4ee5\u4e0b\u306e\u30da\u30fc\u30b8\u304b\u3089\u5404<code>OS<\/code>\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u65b9\u6cd5\u304c\u308f\u304b\u308a\u307e\u3059\u306e\u3067\u3001\u305c\u3072\u8a66\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><strong>\ud83d\udcdd \u53c2\u8003\u30da\u30fc\u30b8\uff1a<\/strong>\u00a0<a href=\"https:\/\/ngrok.com\/download\" target=\"_blank\" rel=\"noopener\">Install ngrok<\/a><\/p>\n<h1>\u4f01\u696d\u69d8\u3078\u306e\u3054\u63d0\u6848<\/h1>\n<p>\u4eca\u56de\u306e\u6280\u8853\u3092\u4f7f\u3046\u3068\u3001\u4f8b\u3048\u3070\u300c<strong>\u5de5\u5834\u5185\u306e\u4fee\u7406\u3059\u3079\u304d\u5834\u6240\u3092\u5831\u544a\u3059\u308b<\/strong>\u300d\u3068\u304b\u300c<strong>\u51fa\u5148\u306e\u304a\u5ba2\u69d8\u306e\u3044\u308b\u5834\u6240\u3067\u8d77\u3053\u3063\u305f\u4e0d\u5177\u5408\u306e\u901a\u77e5<\/strong>\u300d\u306a\u3069\u3001\u3044\u308d\u3044\u308d\u306a\u30b7\u30b9\u30c6\u30e0\u3068\u3057\u3066\u4f7f\u3048\u308b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001\u4eca\u56de\u306f\u5199\u771f\u3068\u4f4d\u7f6e\u60c5\u5831\u3060\u3051\u3067\u3057\u305f\u304c\u4ed6\u306b\u3082\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u60c5\u5831\u3082\u53d6\u5f97\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<ul>\n<li>\u65e5\u6642\u3092\u9078\u629e\u3059\u308b<\/li>\n<li>\u30ab\u30e1\u30e9\u3092\u81ea\u52d5\u3067\u8d77\u52d5\u3059\u308b<\/li>\n<li>\u96fb\u8a71\u756a\u53f7\u3092\u958b\u304f<\/li>\n<li>\u7279\u5b9a\u306e URL \u3092\u958b\u304f<\/li>\n<\/ul>\n<p>\u305c\u3072\u3053\u3046\u3044\u3063\u305f\u6a5f\u80fd\u3092\u4f7f\u3063\u3066\u793e\u5185\u30b7\u30b9\u30c6\u30e0\u3084\u9867\u5ba2\u5411\u3051\u30b5\u30fc\u30d3\u30b9\u3092\u958b\u767a\u3057\u305f\u3044\u5834\u5408\u306f\u305c\u3072\u304a\u6c17\u8efd\u306b\u304a\u554f\u3044\u5408\u308f\u305b\u304b\u3089\u3054\u9023\u7d61\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\u300c<strong>LINE Messaging API + Laravel<\/strong>\u300d\u3067\u5199\u771f\uff06\u4f4d\u7f6e\u60c5\u5831\u306e\u901a\u77e5\u30b7\u30b9\u30c6\u30e0\u3092\u3064\u304f\u3063\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p><code>LINE<\/code>\u306f\u3082\u306f\u3084\u30a4\u30f3\u30d5\u30e9\u3068\u3044\u3063\u3066\u3044\u3044\u3050\u3089\u3044\u306e\u30e6\u30fc\u30b6\u30fc\u304c\u3044\u307e\u3059\u306e\u3067\u3001\u3053\u308c\u3092\u4f7f\u3063\u3066\u4f55\u304b\u4fbf\u5229\u306a\u30b5\u30fc\u30d3\u30b9\u3092\u4f5c\u3063\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u306d\u3002<\/p>\n<p>\u307e\u305f\u3001\u4eca\u56de\u306f\u5b9f\u88c5\u3057\u3066\u3044\u307e\u305b\u3093\u304c\u3001\u4eca\u56de\u306e\u8a18\u4e8b\u306e\u767a\u7aef\u306b\u306a\u3063\u305f\u795e\u6238\u5e02\u306e\u901a\u5831\u30b7\u30b9\u30c6\u30e0\u3067\u306f\u30e1\u30cb\u30e5\u30fc\u304c\u8868\u793a\u3055\u308c\u3066\u3044\u3066\u305d\u3053\u304b\u3089\u901a\u5831\u306e\u4ed6\u306b\u3082\u3044\u308d\u3044\u308d\u306a\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u3067\u3057\u305f\u3002<\/p>\n<p>\u4eca\u5f8c\u306f\u3053\u3093\u306a\u30e1\u30cb\u30e5\u30fc\u306a\u3069\u3082\u4f7f\u3063\u3066\u307f\u305f\u3044\u3067\u3059\u306d\u3002<\/p>\n<p>\u305c\u3072\u7686\u3055\u3093\u3082\u3084\u3063\u3066\u307f\u3066\u304f\u3060\u3055\u3044\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-4328 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/08\/no_3.png\" alt=\"\" width=\"364\" height=\"320\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/08\/no_3.png 364w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/08\/no_3-300x264.png 300w\" sizes=\"auto, (max-width: 364px) 100vw, 364px\" \/>\u300c\u7d50\u5c40\u3001\u4eac\u90fd\u306f<br \/>\n\u6ede\u5728\u3057\u305f\u306e\u306f\u3001\u305f\u3063\u305f\uff11\u6642\u9593\u307b\u3069<br \/>\n\u3067\u3057\u305f\uff08\u7b11\uff09\u697d\u3057\u304b\u3063\u305f\ud83c\udf7b\u300d<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u79c1\u306f\uff08\u307b\u307c\u590f\u3060\u3051\u3067\u3059\u304c\uff09\u5404\u5730\u3092\u56de\u3063\u3066\u3044\u308d\u3044\u308d\u306a\u300c\u73cd\u30b9\u30dd\u30c3\u30c8\u300d\u3092\u5de1\u308b\u306e\u304c\u5927\u597d\u304d\u306a\u3093\u3067\u3059\u304c\u3001\u305d\u3093\u306a\u79c1\u304c\u300c\u3078\u3047\u3001\u3053\u308c\u4fbf\u5229\u306a\u30b7\u30b9\u30c6\u30e0\u3060\u306a\u2757\u300d\u3068\u601d\u3063\u305f\u30cb\u30e5\u30fc\u30b9\u304c &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.capilano-fw.com\/?p=12168\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;Line Messaging API \u3067\u753b\u50cf\u3064\u304d\u901a\u5831\u30b7\u30b9\u30c6\u30e0\u3092\u3064\u304f\u308b\uff08\u795e\u6238\u5e02\u306b\u5f71\u97ff\u3055\u308c\u3066\uff09&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":12191,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[164],"class_list":["post-12168","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-laravel","tag-line"],"_links":{"self":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/12168","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=12168"}],"version-history":[{"count":12,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/12168\/revisions"}],"predecessor-version":[{"id":12195,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/12168\/revisions\/12195"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/media\/12191"}],"wp:attachment":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=12168"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=12168"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=12168"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}