{"id":11581,"date":"2023-04-10T07:00:27","date_gmt":"2023-04-09T22:00:27","guid":{"rendered":"https:\/\/blog.capilano-fw.com\/?p=11581"},"modified":"2023-04-10T07:01:25","modified_gmt":"2023-04-09T22:01:25","slug":"laravel-chatgpt-%e3%81%a7%e7%89%b9%e5%ae%9a%e3%81%ae%e3%83%9a%e3%83%bc%e3%82%b8%e3%81%8c80%e4%bb%a5%e4%b8%8a%e5%a4%89%e6%9b%b4%e3%81%95%e3%82%8c%e3%81%9f%e3%82%89%e9%80%9a%e7%9f%a5%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"https:\/\/blog.capilano-fw.com\/?p=11581","title":{"rendered":"Laravel + ChatGPT 4 \u3067\u7279\u5b9a\u306e\u30da\u30fc\u30b8\u304c80%\u4ee5\u4e0a\u5909\u66f4\u3055\u308c\u305f\u3089\u901a\u77e5\u3059\u308b\u6a5f\u80fd\u3092\u3064\u304f\u308b"},"content":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u3053\u306e\u9593\u30aa\u30ea\u30a8\u30f3\u30bf\u30eb\u30e9\u30b8\u30aa\u306e\u4e2d\u7530\u3042\u3063\u3061\u3083\u3093\u304c\u904b\u55b6\u3059\u308b\u300c<strong>\u30e6\u30fc\u30c1\u30e5\u30fc\u30d6\u5927\u5b66<\/strong>\u300d\u3067<code>ChatGPT 4<\/code>\u306e\u52d5\u753b\u3092\u898b\u305f\u306e\u3067\u3059\u304c\u3001\u305d\u3053\u3067\u3061\u3087\u3063\u3068\u30c9\u30ad\u30c3\u3068\u3059\u308b\u5185\u5bb9\u3092\u304a\u3063\u3057\u3083\u3063\u3066\u3044\u307e\u3057\u305f\u3002<\/p>\n<p>\u305d\u308c\u306f\u3001<\/p>\n<p><strong style=\"font-size: 35px;\">Garbage In \u2192 Garbage Out\uff08\u30b4\u30df\u3092\u5165\u308c\u305f\u3089\u3001\u30b4\u30df\u304c\u51fa\u3066\u304f\u308b\uff09<\/strong><\/p>\n<p>\u3064\u307e\u308a\u3001\u5165\u529b\u3059\u308b\u30d7\u30ed\u30f3\u30d7\u30c8\u304c\u4e0b\u624b\u304f\u305d\u3060\u3068<code>ChatGPT<\/code>\u304b\u3089\u8fd4\u3063\u3066\u304f\u308b\u7b54\u3048\u3082\u4e0b\u624b\u304f\u305d\u3060\u3088\u3001\u3068\u3044\u3046\u610f\u5473\u3067\u3059\u3002<\/p>\n<p>\u305d\u3057\u3066\u3001\u3055\u3089\u306b\u3053\u306e\u52d5\u753b\u3067\u306f\u3088\u308a\u826f\u3044\u7d50\u679c\u3092\u30a2\u30a6\u30c8\u30d7\u30c3\u30c8\u3059\u308b\u306b\u306f\u3069\u3046\u3059\u308c\u3070\u3044\u3044\u304b\u3092\u6559\u3048\u3066\u304f\u308c\u305f\u306e\u3067\u3001\u305d\u308c\u3092\u53c2\u8003\u306b\u3057\u3066<code>ChatGPT 4<\/code>\u3092\u4f7f\u3063\u3066\u307f\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u306a\u304a\u3001\u305d\u306e\u52d5\u753b\u3078\u306e\u30ea\u30f3\u30af\u306f<strong>\u79c1\u306e\u30d6\u30ed\u30b0\u3092\u5148\u306b\u898b\u3066\u307b\u3057\u3044\u306e\u3067<\/strong>\uff08\u304d\u3063\u3068\u3082\u3046\u5e30\u3063\u3066\u3053\u306a\u3044\u306e\u3067\uff09\u6700\u5f8c\u306b\u7d39\u4ecb\u3057\u307e\u3059\ud83d\ude02\ud83d\udc4d<\/p>\n<p>\u305d\u3053\u3067\u2757<\/p>\n<p>\u4eca\u56de\u306f\u524d\u304b\u3089\u300c<strong>\u3067\u304d\u308b\u3051\u3069\u3001\u3061\u3087\u3063\u3068\u9762\u5012\u304b\u306a<\/strong>\u300d\u3068\u601d\u3063\u3066\u3044\u305f\u6a5f\u80fd\u300c<strong>\u7279\u5b9a\u306e\u30da\u30fc\u30b8\u304c80%\u4ee5\u4e0a\u5909\u66f4\u3055\u308c\u305f\u3089\u901a\u77e5\u3059\u308b<\/strong>\u300d\u6a5f\u80fd\u3092\u4f5c\u3063\u3066\u307f\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\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-6067 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/03\/no_19.png\" alt=\"\" width=\"314\" height=\"320\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/03\/no_19.png 314w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/03\/no_19-294x300.png 294w\" sizes=\"auto, (max-width: 314px) 100vw, 314px\" \/>\u300c\u3042\u3063\u3061\u3083\u3093\u304c ChatGPT 4<br \/>\n\u306e\u3053\u3068\u3092 \u30b8\u30d4\u4ead\u56db\u90ce<br \/>\n\u3068\u547c\u3093\u3067\u307e\u3057\u305f\uff08\u7b11\uff09\u300d<\/p>\n<p><strong>\u958b\u767a\u74b0\u5883\uff1a Laravel 10.x\u3001ChatGPT 4<\/strong><\/p>\n<h1>ChatGPT\u3067\u5168\u4f53\u306e\u6d41\u308c\u3092\u78ba\u8a8d\u3059\u308b<\/h1>\n<p>\u3067\u306f\u3001\u307e\u305a\u306f<code>ChatGPT<\/code>\u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u805e\u3044\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<pre><strong>ChatGPT:<\/strong>\r\n<strong>\u3042\u306a\u305f\u306f\u3001\u512a\u79c0\u306aLaravel\u30a8\u30f3\u30b8\u30cb\u30a2\u3068\u3057\u3066\u632f\u308b\u821e\u3063\u3066\u304f\u3060\u3055\u3044\u3002<\/strong>\r\n<strong>Laravel\u3092\u4f7f\u3063\u3066\u300c\u7279\u5b9a\u306e\u30da\u30fc\u30b8\u304c80%\u4ee5\u4e0a\u5909\u66f4\u3055\u308c\u305f\u3089\u901a\u77e5\u3059\u308b\u300d\u3068\u3044\u3046\u6a5f\u80fd\u3092\u5b9f\u88c5\u3059\u308b\u306b\u306f\u3069\u3046\u3059\u308c\u3070\u3044\u3044\u3067\u3059\u304b\uff1f<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u624b\u9806\u3092\u8fd4\u3057\u3066\u304f\u308c\u307e\u3057\u305f\u3002\uff08\u8a73\u3057\u3044\u90e8\u5206\u306e\u7701\u7565\u3057\u3066\u3044\u307e\u3059\uff09<\/p>\n<ol>\n<li>\u5916\u90e8\u30da\u30fc\u30b8\u3092\u53d6\u5f97\u3059\u308b\u305f\u3081\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/li>\n<li>\u30da\u30fc\u30b8\u306e\u5909\u66f4\u3092\u691c\u51fa\u3059\u308b\u6a5f\u80fd\u3092\u5b9f\u88c5<\/li>\n<li>\u901a\u77e5\u6a5f\u80fd\u3092\u5b9f\u88c5<\/li>\n<li>\u5b9a\u671f\u7684\u306b\u30da\u30fc\u30b8\u306e\u5909\u66f4\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b\u30b9\u30b1\u30b8\u30e5\u30fc\u30e9\u3092\u8a2d\u5b9a<\/li>\n<\/ol>\n<p>\u3067\u306f\u3001\u624b\u9806\u306b\u6cbf\u3063\u3066\u4f5c\u696d\u3092\u9032\u3081\u3066\u307f\u307e\u3057\u3087\u3046\u2757<\/p>\n<h1>\u5916\u90e8\u30da\u30fc\u30b8\u3092\u53d6\u5f97\u3059\u308b\u305f\u3081\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h1>\n<p><code>ChatGPT<\/code>\u306f\u30d1\u30c3\u30b1\u30fc\u30b8\u300c<strong>guzzlehttp\/guzzle<\/strong>\u300d\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3088\u3046\u306b\u8a00\u3063\u3066\u304d\u307e\u3059\u3002<\/p>\n<p>\u305f\u3060\u3001<code>Laravel 10.x<\/code>\u3067\u306f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u3068\u304d\u306b\u306f\u3059\u3067\u306b<code>guzzlehttp\/guzzle<\/code>\u304c\u5b58\u5728\u3057\u3066\u3044\u308b\u306e\u3067\u3053\u3053\u306f\u4e0d\u8981\u3067\u3059\u3002\uff08\u305d\u3057\u3066\u3001<code>Guzzle<\/code>\u3092\u5229\u7528\u3057\u305f<code>Http<\/code>\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30af\u30e9\u30b9\u307e\u3067\u3042\u308a\u307e\u3059\uff09<\/p>\n<h1>\u30da\u30fc\u30b8\u306e\u5909\u66f4\u3092\u691c\u51fa\u3059\u308b\u6a5f\u80fd\u3092\u5b9f\u88c5<\/h1>\n<p><code>ChatGPT<\/code>\u306f\u30da\u30fc\u30b8\u306e\u5909\u66f4\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b\u4ee5\u4e0b\u306e\u30af\u30e9\u30b9\u3092\u63d0\u6848\u3057\u3066\u304f\u308c\u307e\u3057\u305f\u3002<\/p>\n<pre><strong>\/\/ \u26a0 \u3053\u306e\u30b3\u30fc\u30c9\u306f\u6b63\u3057\u304f\u3042\u308a\u307e\u305b\u3093<\/strong>\r\n\r\nuse GuzzleHttp\\Client;\r\n\r\nclass PageChangeDetector\r\n{\r\n    private $previousContent;\r\n    private $currentContent;\r\n\r\n    public function __construct($url)\r\n    {\r\n        <strong>$this-&gt;previousContent = $this-&gt;getContent($url);<\/strong>\r\n    }\r\n\r\n    private function getContent($url)\r\n    {\r\n        $client = new Client();\r\n        <strong>$response = $client-&gt;get($url);<\/strong>\r\n        return $response-&gt;getBody()-&gt;getContents();\r\n    }\r\n\r\n    public function isChanged($url, $threshold = 0.8)\r\n    {\r\n        $this-&gt;currentContent = $this-&gt;getContent($url);\r\n        $similarity = similar_text($this-&gt;previousContent, $this-&gt;currentContent, $percent);\r\n        $this-&gt;previousContent = $this-&gt;currentContent;\r\n        return (1 - $percent \/ 100) &gt;= $threshold;\r\n    }\r\n}\r\n<\/pre>\n<p>\u3057\u304b\u3057\u3001\u3053\u308c\u306f\u30b3\u30fc\u30c9\u3068\u3057\u3066\u306f\u30a8\u30e9\u30fc\u306f\u51fa\u307e\u305b\u3093\u304c<strong>\u8ad6\u7406\u7684\u306b\u6b63\u3057\u304f\u3042\u308a\u307e\u305b\u3093\u3002<\/strong><\/p>\n<p>\u3068\u3044\u3046\u306e\u3082\u3001\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u5185\u3067\u306f<code>URL<\/code>\u3092\u4f7f\u3063\u3066\u524d\u56de\u306e\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3059\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u304c\u3001<code>isChanged()<\/code>\u3067\u3082\u307e\u305f\u540c\u3058\u304fURL\u3092\u4f7f\u3063\u3066\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3064\u307e\u308a\u3001\u3053\u308c\u3060\u3068<strong>\u6570\u79d2\u3068\u7d4c\u305f\u305a\u306b\u5909\u66f4\u30c1\u30a7\u30c3\u30af\u3092\u3059\u308b<\/strong>\u3053\u3068\u306b\u306a\u308a\u3001\u6bce\u56de\u300c<strong>\u5909\u66f4\u306a\u3057<\/strong>\u300d\u3068\u3044\u3046\u5224\u65ad\u306b\u306a\u308b\u53ef\u80fd\u6027\u5927\u3067\u3059\u3002<\/p>\n<p>\u305d\u3053\u3067\u3001\u65b0\u305f\u306a\u6761\u4ef6\u3092\u3064\u3051\u3066<code>ChatGPT<\/code>\u306b\u6295\u3052\u3066\u307f\u308b\u3053\u3068\u306b\u3057\u307e\u3059\u3002\uff08\u306a\u304a\u3001\u9014\u4e2d\u4f55\u56de\u304b\u8a66\u884c\u932f\u8aa4\u3057\u305f\u306e\u3067\u300c<strong>\u4e00\u756a\u6700\u521d\u306b\u4f7f\u3063\u305f<\/strong>\u300d\u3068\u3044\u3046\u6587\u8a00\u3092\u5165\u308c\u3066\u3044\u307e\u3059<\/p>\n<p>\uff08<code>ChatGPT<\/code>\u3092\u4f7f\u3063\u305f\u958b\u767a\u3067\u91cd\u8981\u306a\u306e\u306f\u3001\u5fc5\u305a\u30b3\u30fc\u30c9\u3092\u9806\u306b\u30c1\u30a7\u30c3\u30af\u3057\u3066\u3044\u304f\u3053\u3068\u3067\u3059\u306d\ud83d\ude05\uff09<\/p>\n<pre><strong>ChatGPT:\r\n\u4e00\u756a\u6700\u521d\u306b\u4f7f\u3063\u305f PageChangeDetector\u30af\u30e9\u30b9\u3092\u4f7f\u3063\u3066\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u4fee\u6b63\u3057\u3066\u304f\u3060\u3055\u3044\u3002\r\n\u30fb\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u5185\u3067getContent()\u306f\u4f7f\u308f\u305afetched_pages\u30c6\u30fc\u30d6\u30eb\u304b\u3089URL\u3092\u30ad\u30fc\u306b\u3057\u3066\u30ec\u30b3\u30fc\u30c9\u3092\u53d6\u5f97\u3057\u3001\u305d\u306e\u4e2d\u304b\u3089content\u3068\u3044\u3046\u30c7\u30fc\u30bf\u3092$this-&gt;previousContent\u306b\u683c\u7d0d\u3059\u308b\r\n\u30fbisChanged\u5185\u3067\u3082\u3057$percent\u304c$threshold\u3092\u8d85\u3048\u3066\u3044\u308c\u3070\u3001\u6b21\u56de\u306e\u305f\u3081\u306bcontent\u306e\u5024\u3092\u66f4\u65b0\u3059\u308b\r\n<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u4fee\u6b63\u3057\u3066\u304f\u308c\u307e\u3057\u305f\u3002\uff08\u306a\u304a\u3001\u6700\u521d\u306e\u30b3\u30fc\u30c9\u958b\u59cb\u90e8\u5206\u3068\u3001\u30cd\u30fc\u30e0\u30b9\u30da\u30fc\u30b9\u306f\u79c1\u304c\u3064\u3051\u307e\u3057\u305f\uff09<\/p>\n<p><strong>Console\/Commands\/CheckPageChanges.php<\/strong><\/p>\n<pre><strong>&lt;?php\r\n\r\nnamespace App\\Utils;\r\n\r\nuse GuzzleHttp\\Client;\r\nuse App\\Models\\FetchedPage;\r\nuse App\\Mail\\PageChangeNotification;\r\nuse Illuminate\\Support\\Facades\\Mail;\r\n\r\nclass PageChangeDetector\r\n{\r\n    private $previousContent;\r\n    private $currentContent;\r\n\r\n    public function __construct($url)\r\n    {\r\n        $fetchedPage = FetchedPage::where('url', $url)-&gt;first();\r\n        $this-&gt;previousContent = $fetchedPage ? $fetchedPage-&gt;content : null;\r\n    }\r\n\r\n    private function getContent($url)\r\n    {\r\n        $client = new Client();\r\n        $response = $client-&gt;get($url);\r\n        return (string) $response-&gt;getBody();\r\n    }\r\n\r\n    public function isChanged($url, $threshold = 0.8)\r\n    {\r\n        $this-&gt;currentContent = $this-&gt;getContent($url);\r\n        $similarity = similar_text($this-&gt;previousContent, $this-&gt;currentContent, $percent);\r\n        $changeRate = (1 - $percent \/ 100);\r\n\r\n        if ($changeRate &gt;= $threshold) {\r\n            \/\/ Send email notification\r\n            $recipientEmail = 'example@example.com'; \/\/ Change this to the recipient's email address\r\n            Mail::to($recipientEmail)-&gt;send(new PageChangeNotification($changeRate, $url));\r\n\r\n            \/\/ Update the content in the database for the next check\r\n            $fetchedPage = FetchedPage::where('url', $url)-&gt;first();\r\n            if (!$fetchedPage) {\r\n                $fetchedPage = new FetchedPage();\r\n                $fetchedPage-&gt;url = $url;\r\n            }\r\n            $fetchedPage-&gt;content = $this-&gt;currentContent;\r\n            $fetchedPage-&gt;save();\r\n\r\n            return true;\r\n        } else {\r\n            return false;\r\n        }\r\n    }\r\n}\r\n<\/strong><\/pre>\n<p>\u6b63\u76f4\u306a\u3068\u3053\u308d\u3001\u3053\u306e\u30b3\u30fc\u30c9\u3068\u3057\u3066\u306f\u4ee5\u4e0b\u306e\u70b9\u304c\u6c17\u306b\u306a\u308a\u307e\u3059\u304c\u9593\u9055\u3044\u3067\u306f\u306a\u3044\u306e\u3067OK\u3068\u3057\u307e\u3059\u3002<\/p>\n<ul>\n<li>\u76f4\u63a5 Guzzle \u3092\u547c\u3073\u51fa\u3055\u306a\u304f\u3066\u3082 Laravel \u306b\u306f\uff08Guzzle\u3092\u4f7f\u3063\u305f\uff09Http\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u304c\u3042\u308b\u306e\u3067\u3001\u305d\u3063\u3061\u306e\u307b\u3046\u304c\u30d9\u30bf\u30fc<\/li>\n<li>FetchedPage \u3067\u30c7\u30fc\u30bf\u53d6\u5f97\u3057\u3066\u5b58\u5728\u30c1\u30a7\u30c3\u30af\u3057\u3066\u3044\u307e\u3059\u304c\u3001FirstOrNew() \u3084FirstOrCreate() \u3067\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u3067\u304d\u308b<\/li>\n<li>isChanged \u306e return false \u306b else \u306f\u4e0d\u8981<\/li>\n<\/ul>\n<p>\uff08\u79c1\u3001\u3001\u3001\u306a\u3093\u304b\u610f\u5730\u60aa\u306a\u5c0f\u59d1\u307f\u305f\u3044\u3067\u3059\u304b\u306d\u2026\ud83d\ude02\uff09<\/p>\n<p>\u305d\u3057\u3066\u3001\u30e2\u30c7\u30eb\uff06\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u3092\u3064\u304f\u308a\u307e\u3059\u3002<\/p>\n<pre><strong>php artisan make:model FetchedPage -m<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u3001\u30e2\u30c7\u30eb\u3068\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u304c\u4f5c\u6210\u3055\u308c\u308b\u306e\u3067\u4e2d\u8eab\u3092\u6b21\u306e\u3088\u3046\u306b\u5909\u66f4\u3057\u307e\u3059\u3002\uff08\u3053\u308c\u3082<code>ChatGPT<\/code>\u306e\u6307\u793a\u3067\u3059\uff09<\/p>\n<pre>\/\/ \u7701\u7565\r\n<strong>    public function up()\r\n    {\r\n        Schema::create('fetched_pages', function (Blueprint $table) {\r\n            $table-&gt;id();\r\n            $table-&gt;string('url')-&gt;unique();\r\n            $table-&gt;text('content');\r\n            $table-&gt;timestamps();\r\n        });\r\n    }<\/strong>\r\n\r\n\/\/ \u7701\u7565<\/pre>\n<p>\u203b \u3061\u306a\u307f\u306b\u7d30\u304b\u3044\u3067\u3059\u304c\u3001<code>ChatGPT<\/code>\u306f<code>CreateFetchedPagesTable<\/code>\u3068\u3044\u3046\u30af\u30e9\u30b9\u540d\u3092\u3064\u3051\u3066\u3044\u307e\u3059\u304c\u3001<code>Laravel 10.x<\/code>\u3067\u306f\u7121\u540d\u30af\u30e9\u30b9\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u306e\u3067\u3001\u63a1\u7528\u3057\u307e\u305b\u3093\u3067\u3057\u305f\u3002\uff08\u3084\u306f\u308a\u6700\u65b0\u306e\u60c5\u5831\u306b\u306f\u5c11\u3057\u5f31\u3044\u90e8\u5206\u304c\u3042\u308b\u3088\u3046\u3067\u3059\u306d\uff09<\/p>\n<p>\u3067\u306f\u3001\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u5b9f\u884c\u3067\u3059\u3002<\/p>\n<pre><strong>php artisan migrate<\/strong><\/pre>\n<p>\u3059\u308b\u3068\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-11583\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/04\/laravel_monitor_page_change_1.png\" alt=\"\" width=\"367\" height=\"263\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/04\/laravel_monitor_page_change_1.png 367w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/04\/laravel_monitor_page_change_1-300x215.png 300w\" sizes=\"auto, (max-width: 367px) 100vw, 367px\" \/><\/p>\n<h1>\u901a\u77e5\u6a5f\u80fd\u3092\u5b9f\u88c5<\/h1>\n<p>\u3067\u306f\u901a\u77e5\u6a5f\u80fd\u3067\u3059\u304c\u3001\u56de\u7b54\u306f\u6587\u7ae0\u306e\u307f\u3060\u3063\u305f\u306e\u3067\u3001\u30b3\u30fc\u30c9\u3092\u51fa\u3057\u3066\u3082\u3089\u3048\u308b\u3088\u3046\u306b\u983c\u3093\u3067\u307f\u307e\u3059\u3002<\/p>\n<p>\u30d7\u30ed\u30f3\u30d7\u30c8\u306f\u4ee5\u4e0b\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<pre><strong>ChatGPT: <\/strong>\r\n<strong>\u901a\u77e5\u6a5f\u80fd\u306fMailable\u3067\u30e1\u30fc\u30eb\u9001\u4fe1\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u305f\u3044\u3067\u3059\u3002 \r\n\u30b3\u30fc\u30c9\u3092\u66f8\u3044\u3066\u304f\u3060\u3055\u3044\u3002 \r\n\r\n\u306a\u304a\u3001\u30e1\u30fc\u30eb\u9001\u4fe1\u3059\u308b\u5185\u5bb9\u306f\u5909\u66f4\u7387\u3068\u5bfe\u8c61\u3068\u306a\u308bURL\u3078\u306e\u30ea\u30f3\u30af\u3092\u542b\u3081\u3066\u304f\u3060\u3055\u3044\u3002<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u624b\u9806\u3092\u63d0\u6848\u3057\u3066\u304f\u308c\u307e\u3057\u305f\u3002<\/p>\n<ol>\n<li>Mailable\u30af\u30e9\u30b9\u3092\u4f5c\u6210<\/li>\n<li>Mailable\u30af\u30e9\u30b9\u3092\u7de8\u96c6\u3057\u3066\u3001\u30e1\u30fc\u30eb\u5185\u5bb9\u3092\u5b9a\u7fa9<\/li>\n<li>.env\u30d5\u30a1\u30a4\u30eb\u3092\u8a2d\u5b9a\u3057\u3066\u30e1\u30fc\u30eb\u9001\u4fe1\u306e\u8a2d\u5b9a\u3092\u884c\u3046<\/li>\n<li>\u901a\u77e5\u6a5f\u80fd\u3092\u5b9f\u88c5<\/li>\n<\/ol>\n<p>\u3053\u308c\u3082\u9806\u306b\u4f5c\u696d\u3092\u3057\u3066\u3044\u304d\u307e\u3059\u3002<br \/>\n\u307e\u305a\u306f\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u5b9f\u884c\u3067\u3059\u3002<\/p>\n<pre><strong>php artisan make:mail PageChangeNotification<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u3001\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c\u308b\u306e\u3067\u4e2d\u8eab\u3092\u6b21\u306e\u3088\u3046\u306b\u5909\u66f4\u3057\u307e\u3059\u3002\uff08\u306a\u304a\u3001\u3053\u308c\u306f\u53e4\u3044\u66f8\u304d\u65b9\u3067\u3059\u30fb\u30fb\u30fb\u304c\u3001\u9593\u9055\u3044\u3067\u306f\u306a\u3044\u306e\u3067\u63a1\u7528\u3057\u307e\u3057\u305f\ud83d\udc4d\uff09<\/p>\n<p><strong>Mail\/PageChangeNotification.php<\/strong><\/p>\n<pre><strong>&lt;?php\r\n\r\nnamespace App\\Mail;\r\n\r\nuse Illuminate\\Bus\\Queueable;\r\nuse Illuminate\\Contracts\\Queue\\ShouldQueue;\r\nuse Illuminate\\Mail\\Mailable;\r\nuse Illuminate\\Queue\\SerializesModels;\r\n\r\nclass PageChangeNotification extends Mailable\r\n{\r\n    use Queueable, SerializesModels;\r\n\r\n    public $changeRate;\r\n    public $url;\r\n\r\n    public function __construct($changeRate, $url)\r\n    {\r\n        $this-&gt;changeRate = $changeRate;\r\n        $this-&gt;url = $url;\r\n    }\r\n\r\n    public function build()\r\n    {\r\n        return $this-&gt;subject('Page Changed Notification')\r\n            -&gt;text('emails.page_change_notification')\r\n            -&gt;with([\r\n                'changeRate' =&gt; $this-&gt;changeRate,\r\n                'url' =&gt; $this-&gt;url,\r\n            ]);\r\n    }\r\n}<\/strong><\/pre>\n<p>\u203b <code>text('emails.page_change_notification')<\/code> \u306e\u90e8\u5206\u306f\u5f53\u521d\u30de\u30fc\u30af\u30c0\u30a6\u30f3\u3060\u3063\u305f\u306e\u3067\u3059\u304c\u3001\u3042\u3068\u3067\u5909\u66f4\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u305d\u3057\u3066\u3001\u30e1\u30fc\u30eb\u306e\u30d3\u30e5\u30fc\u3067\u3059\u3002<br \/>\n\u7279\u306b\u6307\u5b9a\u3057\u3066\u3044\u306a\u304b\u3063\u305f\u306e\u3067\u30de\u30fc\u30af\u30c0\u30a6\u30f3\u3068\u3057\u3066\u63d0\u6848\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<p>\u304c\u2026\u4ee5\u4e0b\u306e\u3068\u304a\u308a\u82f1\u8a9e\u3067\u306e\u30e1\u30fc\u30eb\u5185\u5bb9\u3067\u3057\u305f\u3002\uff08Oh, my&#8230;\uff09<\/p>\n<pre><strong>@component('mail::message')\r\n# Page Changed Notification\r\n\r\nThe target page has been changed by {{ $changeRate * 100 }}%.\r\n\r\n@component('mail::button', ['url' =&gt; $url])\r\nView Changed Page\r\n@endcomponent\r\n\r\nThanks,<\/strong>\r\n<strong>\r\n{{ config('app.name') }}\r\n@endcomponent\r\n<\/strong><\/pre>\n<p>\u305d\u308c\u307b\u3069\u82f1\u8a9e\u30ec\u30d9\u30eb\u304c\u9ad8\u304f\u306a\u3044\u79c1\u3067\u3082\u77ed\u3044\u306e\u3067\u554f\u984c\u306a\u3044\u3067\u3059\u304c\u3001\u5ff5\u306e\u305f\u3081\u65e5\u672c\u8a9e\u5316\u3057\u3066\u3082\u3089\u3048\u308b\u3088\u3046\u306b\u983c\u3093\u3067\u307f\u307e\u3059\u3002<\/p>\n<pre><strong>ChatGPT:<\/strong>\r\n<strong>\u5148\u307b\u3069\u306e\u30de\u30fc\u30af\u30c0\u30a6\u30f3\u306e\u30e1\u30fc\u30eb\u672c\u6587\u306f\u82f1\u8a9e\u3067\u3057\u305f\u3002 \r\n\u65e5\u672c\u8a9e\u306b\u7ffb\u8a33\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u3001\u3053\u306e\u3088\u3046\u306b\u5909\u66f4\u3057\u3066\u304f\u308c\u307e\u3057\u305f\u3002<\/p>\n<pre><strong>@component('mail::message')\r\n# \u30da\u30fc\u30b8\u5909\u66f4\u901a\u77e5\r\n\r\n\u5bfe\u8c61\u30da\u30fc\u30b8\u306e\u5909\u66f4\u7387\u304c{{ $changeRate * 100 }}%\u3067\u3059\u3002\r\n\r\n@component('mail::button', ['url' =&gt; $url])\r\n\u5909\u66f4\u3055\u308c\u305f\u30da\u30fc\u30b8\u3092\u8868\u793a\r\n@endcomponent\r\n\r\n\u3042\u308a\u304c\u3068\u3046\u3054\u3056\u3044\u307e\u3059\u3002<\/strong>\r\n<strong>\r\n{{ config('app.name') }}\r\n@endcomponent<\/strong><\/pre>\n<p>\u3053\u308c\u3067\u3001\u554f\u984c\u306a\u3044\u306e\u3067\u3059\u304c\u958b\u767a\u306b\u4f7f\u3063\u3066\u3044\u308b<code>MailCatcher<\/code>\u304c\u30de\u30fc\u30af\u30c0\u30a6\u30f3\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u306a\u3044\u3088\u3046\u3060\u3063\u305f\u306e\u3067\u3001\u3055\u3089\u306b\u6ce8\u6587\u3059\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n<pre><strong>ChatGPT:<\/strong>\r\n<strong>\u65e5\u672c\u8a9e\u5316\u3057\u3066\u3082\u3089\u3063\u305f\u30e1\u30fc\u30eb\u672c\u6587\u3067\u3059\u304c\u3001\u30de\u30fc\u30af\u30c0\u30a6\u30f3\u306b\u306f\u5bfe\u5fdc\u3057\u3066\u3044\u306a\u3044\u30e1\u30fc\u30eb\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306a\u306e\u3067\u3001\u30c6\u30ad\u30b9\u30c8\u5f62\u5f0f\u306b\u5909\u66f4\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u3001\u6700\u7d42\u7684\u306b\u3053\u3046\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<pre><strong>\u30da\u30fc\u30b8\u5909\u66f4\u901a\u77e5\r\n===================\r\n\r\n\u5bfe\u8c61\u30da\u30fc\u30b8\u306e\u5909\u66f4\u7387\u304c{{ $changeRate * 100 }}%\u3067\u3059\u3002\r\n\r\n\u5909\u66f4\u3055\u308c\u305f\u30da\u30fc\u30b8\u3092\u8868\u793a: {{ $url }}\r\n\r\n\u3042\u308a\u304c\u3068\u3046\u3054\u3056\u3044\u307e\u3059\u3002\r\n{{ config('app.name') }}<\/strong><\/pre>\n<p>\u3044\u3044\u3067\u3059\u306d\ud83d\udc4d<\/p>\n<h1>\u5b9a\u671f\u7684\u306b\u30da\u30fc\u30b8\u306e\u5909\u66f4\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b\u30b9\u30b1\u30b8\u30e5\u30fc\u30e9\u3092\u8a2d\u5b9a<\/h1>\n<p>\u3082\u3061\u308d\u3093\u30da\u30fc\u30b8\u306e\u30c1\u30a7\u30c3\u30af\u306f\u30b9\u30b1\u30b8\u30e5\u30fc\u30e9\u3092\u4f7f\u3063\u3066\u3082\u3044\u3044\u306e\u3067\u3059\u304c\u3001\u4eca\u56de\u306f<code>cron<\/code>\u3092\u4f7f\u3063\u3066\u5b9f\u884c\u3057\u305f\u3044\u306e\u3067\u3001\u72ec\u81ea\u306e<code>Artisan<\/code>\u30b3\u30de\u30f3\u30c9\u3092\u3064\u304f\u308b\u3088\u3046\u983c\u3093\u3067\u307f\u307e\u3059\u3002<\/p>\n<pre><strong>ChatGPT:\r\n\u4eca\u56de\u306f\u30b9\u30b1\u30b8\u30e5\u30fc\u30e9\u306f\u4f7f\u308f\u305a\u3001cron\u3092\u4f7f\u3063\u3066\u30bf\u30a4\u30de\u30fc\u5b9f\u884c\u3057\u307e\u3059\u3002<\/strong>\r\n<strong>\u305d\u306e\u305f\u3081\u3001\u72ec\u81ea\u306eArtisan\u30b3\u30de\u30f3\u30c9\u3092\u4f5c\u3063\u3066\u304f\u3060\u3055\u3044\u3002<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u3001\u624b\u9806\u306f\u3053\u3046\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<ol>\n<li>Artisan\u30b3\u30de\u30f3\u30c9\u3092\u4f5c\u6210<\/li>\n<li>Artisan\u30b3\u30de\u30f3\u30c9\u306e\u5b9f\u88c5<\/li>\n<li>cron\u3067\u30bf\u30a4\u30de\u30fc\u5b9f\u884c\u3092\u8a2d\u5b9a<\/li>\n<\/ol>\n<p>\u3067\u306f\u3001\u63d0\u6848\u3055\u308c\u305f\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<pre><strong>php artisan make:<span class=\"hljs-built_in\">command<\/span> CheckPageChanges<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u3001\u30b3\u30de\u30f3\u30c9\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c\u308b\u306e\u3067\u3001\u4e2d\u8eab\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3059\u308b\u3088\u3046\u8a00\u308f\u308c\u307e\u3059\u3002<\/p>\n<p>\u305f\u3060\u3001\u3053\u308c\u3082\u6b63\u3057\u304f\u3042\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002<\/p>\n<pre><strong>\/\/ \u26a0 \u6ce8\u610f\uff1a \u3053\u308c\u306f\u6b63\u3057\u304f\u3042\u308a\u307e\u305b\u3093<\/strong>\r\n\r\nuse Illuminate\\Console\\Command;\r\n<strong>use App\\Services\\PageChangeDetector;<\/strong>\r\n\r\nclass CheckPageChanges extends Command\r\n{\r\n    protected $signature = 'page:check-changes {url}';\r\n\r\n    protected $description = 'Check if a specific page has changed more than 80% and send a notification if it has';\r\n\r\n    public function handle()\r\n    {\r\n        $url = $this-&gt;argument('url');\r\n        $detector = new PageChangeDetector();\r\n        \r\n        if ($detector-&gt;isChanged($url)) {\r\n            $this-&gt;info('The page has changed more than 80%. A notification has been sent.');\r\n        } else {\r\n            $this-&gt;info('The page has not changed more than 80%. No notification has been sent.');\r\n        }\r\n    }\r\n}<\/pre>\n<p>\u30fb\u30fb\u30fb\u3068\u306f\u3044\u3063\u3066\u3082\u3001\u4eca\u56de\u306f<code>PageChangeDetector<\/code>\u306e\u30cd\u30fc\u30e0\u30b9\u30da\u30fc\u30b9\u304c\u9055\u3046\uff08\u3053\u308c\u306f\u79c1\u306e\u5224\u65ad\u3067<code>Utils<\/code>\u30d5\u30a9\u30eb\u30c0\u306b\u5165\u308c\u305f\u306e\u3067<code>ChatGPT<\/code>\u306f\u60aa\u304f\u3042\u308a\u307e\u305b\u3093\uff01\uff09\u304c\u9055\u3046\u3060\u3051\u3067\u3057\u305f\u3002<\/p>\n<pre>use App\\Services\\PageChangeDetector;<strong>\r\n\r\n\u2193\u2193\u2193\r\n\r\nuse App\\Utils\\PageChangeDetector;<\/strong><\/pre>\n<p>\u3053\u308c\u3067\u4f5c\u696d\u306f\u5b8c\u4e86\u3067\u3059\u3002<br \/>\n\u304a\u75b2\u308c\u69d8\u3067\u3057\u305f\uff08<code>ChatGPT\uff1d\u30c1\u30e3\u30c3\u30d4\u30fc<\/code>\u304f\u3093\u3082\ud83d\ude04\u2728\uff09<\/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<code>mailcatcher<\/code>\u3092\u8d77\u52d5\u3057\u3066\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u72ec\u81ea<code>Artisan<\/code>\u30b3\u30de\u30f3\u30c9\u3092\u547c\u3073\u51fa\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<pre><strong>php artisan page:check-changes https:\/\/example.com<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb<\/p>\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u8868\u793a\u3055\u308c\u307e\u3057\u305f\u3002\uff08\u901a\u77e5\u3092\u9001\u3063\u305f\u3088\uff01\u3068\u3044\u3046\u610f\u5473\u306b\u306a\u3063\u3066\u307e\u3059\uff09<\/p>\n<pre><strong>The page has changed more than 80%. A notification has been sent.<\/strong><\/pre>\n<p>\u305d\u3053\u3067\u3001<code>mailcatcher<\/code>\u3092\u898b\u3066\u307f\u308b\u3068\u30fb\u30fb\u30fb\u30fb\u30fb<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-11586\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/04\/laravel_monitor_page_change_2.png\" alt=\"\" width=\"367\" height=\"243\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/04\/laravel_monitor_page_change_2.png 367w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/04\/laravel_monitor_page_change_2-300x199.png 300w\" sizes=\"auto, (max-width: 367px) 100vw, 367px\" \/><\/p>\n<p>\u306f\u3044\u2757<br \/>\n\u6307\u793a\u901a\u308a\u3001\u5909\u66f4\u7387\u3068URL\u304c\u30ea\u30f3\u30af\u3068\u3057\u3066\u5165\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u6210\u529f\u3067\u3059\ud83d\ude04\u2728<\/p>\n<p>\u3067\u306f\u3001\u7d9a\u3044\u3066\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u65b9\u3082\u898b\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-11587\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/04\/laravel_monitor_page_change_4.png\" alt=\"\" width=\"456\" height=\"367\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/04\/laravel_monitor_page_change_4.png 456w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/04\/laravel_monitor_page_change_4-300x241.png 300w\" sizes=\"auto, (max-width: 456px) 100vw, 456px\" \/><\/p>\n<p>\u306f\u3044\u2757<br \/>\n\u3053\u3061\u3089\u3082\u304d\u3061\u3093\u3068\u30c7\u30fc\u30bf\u304c\u767b\u9332\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3067\u306f\u3053\u306e\u72b6\u614b\u3067\u3082\u3046\u4e00\u5ea6\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3068\u3069\u3046\u306a\u308b\u3067\u3057\u3087\u3046\u304b\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb<\/p>\n<pre>The page has <strong>not<\/strong> changed more than 80%. No notification has been sent.<\/pre>\n<p><code>80%<\/code>\u4ee5\u4e0a\u306e\u5909\u66f4\u306f\u3042\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002<br \/>\n\u3068\u8fd4\u3063\u3066\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>\u3053\u308c\u3082\u6210\u529f\u3067\u3059\u3002<\/p>\n<p>\u3067\u306f\u3001\u6700\u5f8c\u306b\u308f\u3056\u3068<code>DB<\/code>\u5185\u306e\u30c7\u30fc\u30bf\u3092\u534a\u5206\u4ee5\u4e0a\u524a\u3063\u3066\u304b\u3089\u4fdd\u5b58\u3057\u3001\u305d\u306e\u72b6\u614b\u3067\u3082\u3046\u4e00\u56de\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u3046\u307e\u304f\u3044\u304f\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-11589\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/04\/laravel_monitor_page_change_5.png\" alt=\"\" width=\"377\" height=\"244\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/04\/laravel_monitor_page_change_5.png 377w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/04\/laravel_monitor_page_change_5-300x194.png 300w\" sizes=\"auto, (max-width: 377px) 100vw, 377px\" \/><\/p>\n<p>\u306f\u3044\u2757<br \/>\n\u3046\u307e\u304f\u30d1\u30fc\u30bb\u30f3\u30c6\u30fc\u30b8\u304c\u5909\u66f4\u306b\u306a\u3063\u305f\u3082\u306e\u304c\u901a\u77e5\u3055\u308c\u307e\u3057\u305f\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\u3088\u3046\u306b\u7279\u5b9a\u306e<code>URL<\/code>\u3092\u76e3\u8996\u3059\u308b\u3053\u3068\u3067\u3001\u4f8b\u3048\u3070\u7af6\u5408\u306e\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u3084\u30e9\u30f3\u30c7\u30a3\u30f3\u30b0\u30da\u30fc\u30b8\u3092\u76e3\u8996\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001\u5909\u66f4\u7387\u306f\u81ea\u7531\u306b\u6c7a\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u306e\u3067\u3001\u4f01\u696d\u69d8\u3054\u3068\u306e\u3054\u90fd\u5408\u306b\u5408\u308f\u305b\u305f\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u3092\u3059\u308b\u3053\u3068\u3082\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<p>\u3082\u3057\u305d\u3046\u3044\u3063\u305f\u6a5f\u80fd\u3092\u3054\u5e0c\u671b\u3067\u3057\u305f\u3089\u305c\u3072\u304a\u554f\u3044\u5408\u308f\u305b\u3088\u308a\u3054\u76f8\u8ac7\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>Laravel + ChatGPT 4<\/strong>\u300d\u3067\u7279\u5b9a<code>URL<\/code>\u306e\u76e3\u8996\u6a5f\u80fd\u3092\u3064\u304f\u3063\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p>\u4eca\u56de\u306f\u521d\u3081\u3066\u30d6\u30ed\u30b0\u8a18\u4e8b\u3068\u3057\u3066\u306f<code>ChatGPT 4<\/code>\u3092\u4f7f\u3044\u307e\u3057\u305f\u304c\u3001\u307e\u3060\u307e\u3060\u6163\u308c\u306a\u3044\u90e8\u5206\u3082\u3042\u308a\u6238\u60d1\u3063\u3066\u3057\u307e\u3044\u307e\u3057\u305f\u3002<\/p>\n<p>\u305f\u3060\u3001\u4eca\u56de\u306e\u8a18\u4e8b\u3092\u66f8\u3044\u305f\u3053\u3068\u3067\u5c11\u3057\u6163\u308c\u3066\u304d\u305f\u90e8\u5206\u3082\u3042\u308a\u3001<code>ChatGPT 4<\/code>\uff08\u30c1\u30e3\u30c3\u30d4\u30fc\uff09\u306e\u6027\u683c\u3068\u3044\u3046\u304b\u3054\u6a5f\u5acc\u306b\u306a\u308b\u30c4\u30dc\u307f\u305f\u3044\u306a\u3082\u306e\u304c\u898b\u3048\u3066\u304d\u305f\u3088\u3046\u306a\u6c17\u304c\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u305f\u3060\u3057\uff01<\/p>\n<p><code>ChatGPT<\/code>\u306e\u3064\u304f\u3063\u305f\u30b3\u30fc\u30c9\u306f\u53d7\u8a17\u306e\u4ed5\u4e8b\u3067\u306f\u4f7f\u3044\u306b\u304f\u3044\u3067\u3059\u304b\u306d\u2026\u60c5\u5831\u304c\u53e4\u3044\u306e\u3067\u6614\u306e\u66f8\u304d\u65b9\u306b\u306a\u3063\u3066\u307e\u3059\u3057\u3001\u5197\u9577\u306a\u30b3\u30fc\u30c9\u3082\u3042\u3063\u3066\u3001\u4ed6\u306e\u958b\u767a\u8005\u306e\u65b9\u306b\u898b\u3089\u308c\u305f\u3089\u300c<strong>\u3046\u30fc\u3093\u3001\u3053\u306e\u4eba\u305d\u3093\u306a\u306b\u30b9\u30ad\u30eb\u306a\u3044\u304b\u3082\u2026\ud83d\ude22<\/strong>\u300d\u3068\u304b\u300c<strong>\u6642\u4ee3\u306e\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u304c\u3067\u304d\u306a\u3044\u4eba\u3060\u306a\u2026\ud83d\ude2b<\/strong>\u300d\u306a\u3093\u3066\u601d\u308f\u308c\u308b\u3068\u3001\u4eca\u5f8c\u306e\u4ed5\u4e8b\u306b\u3082\u5f71\u97ff\u3059\u308b\u3068\u601d\u3046\u306e\u3067\u3002<\/p>\n<p>\u307e\u305f\u3001\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u304c\u6016\u3044\u306e\u3067\u500b\u4eba\u60c5\u5831\u3092\u6271\u3046\u5834\u5408\u3084\u3001\u6c7a\u6e08\u30b7\u30b9\u30c6\u30e0\u3067\u306f\u7d76\u5bfe\u306b\u4f7f\u3044\u307e\u305b\u3093\u2757\u6016\u3059\u304e\u308b\u306e\u3067\u3002<\/p>\n<p>\uff08\u624b\u3067\u76f4\u305b\u3088\u3001\u3068\u601d\u308f\u308c\u308b\u304b\u3082\u3067\u3059\u304c\u3001\u305d\u308c\u3092\u3084\u308a\u51fa\u3059\u3068<code>ChatGPT<\/code>\u3092\u4f7f\u308f\u305a\u306b\u66f8\u3044\u305f\u307b\u3046\u304c\u65e9\u3044\u3093\u3067\u3059\u2026\uff09<\/p>\n<p>\u3068\u306f\u3044\u3048\u3001AI\u306f\u3053\u308c\u304b\u3089\u306e\u6642\u4ee3\u306e\u30b9\u30bf\u30f3\u30c0\u30fc\u30c9\u306b\u306a\u308a\u305d\u3046\u306a\u4e88\u611f\u304c\u3057\u3066\u307e\u3059\u3057\u3001\u6700\u65b0\u30b3\u30fc\u30c9\u3092\u9069\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308b\u53ef\u80fd\u6027\u306f\u9ad8\u3044\u306e\u3067\u3001\u4eca\u5f8c\u3082\u3053\u306e\u30d6\u30ed\u30b0\u3068\u3057\u3066\u306f\u3067\u304d\u308b\u3060\u3051\u6d3b\u7528\u3057\u3066\u8a18\u4e8b\u3092\u66f8\u3044\u3066\u3044\u304d\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u307f\u306a\u3055\u3093\u3082\u3044\u308d\u3044\u308d\u3068\u7814\u7a76\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u306d\u3002\uff08\u9006\u306b<code>ChatGPT<\/code>\u3092\u4f7f\u3063\u3066\u3044\u306a\u3044\u3068\u3044\u3046\u306e\u304c\u3001\u9006\u306b\u4fa1\u5024\u306b\u306a\u308b\u6642\u4ee3\u304c\u6765\u308b\u304b\u3082\u3067\u3059\u306d\uff09<\/p>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\uff08<strong>\u30e1\u30a4\u30f3\u306e\ud83d\ude02<\/strong>\uff09\u3042\u3063\u3061\u3083\u3093\u306e\u52d5\u753b\u3092\u304a\u697d\u3057\u307f\u304f\u3060\u3055\u3044 \u3002<\/p>\n<p><strong>\u3010GPT-4\u306e\u4f7f\u3044\u3053\u306a\u3057\u65b9\uff1a\u524d\u7de8\u3011<\/strong><\/p>\n<p><iframe loading=\"lazy\" title=\"\u3010GPT-4\u306e\u4f7f\u3044\u3053\u306a\u3057\u65b9\u2460\u3011AI\u3067\u4ed5\u4e8b\u3092\u4f5c\u308b\u4eba\u3001AI\u306b\u4ed5\u4e8b\u3092\u596a\u308f\u308c\u308b\u4eba\uff01\u4f7f\u3044\u3053\u306a\u305b\u3070\u672a\u6765\u3092\u63b4\u3081\u308b\" width=\"525\" height=\"295\" src=\"https:\/\/www.youtube.com\/embed\/tqvw7Sf2OSA?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<p><strong>\u3010GPT-4\u306e\u4f7f\u3044\u3053\u306a\u3057\u65b9\uff1a\u5f8c\u7de8\u3011<\/strong><\/p>\n<p><iframe loading=\"lazy\" title=\"\u3010GPT-4\u306e\u4f7f\u3044\u3053\u306a\u3057\u65b9\u2461\u3011AI\u306e\u4e0a\u624b\u306a\u6d3b\u7528\u65b9\u6cd5\u306f\u300c\u5165\u529b\u304c7\u5272\u3001\u8abf\u6574\u304c3\u5272\u300d\" width=\"525\" height=\"295\" src=\"https:\/\/www.youtube.com\/embed\/_QERfac0uug?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/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\u3042\u306e\u4eba\u3001\u30db\u30f3\u30c8<br \/>\n\u3044\u3044\u52d5\u753b\u9023\u767a\u3057\u307e\u3059\u306d\u3002<br \/>\n\u5148\u751f\u3001\u3042\u308a\u304c\u3068\u3046\u3054\u3056\u3044\u307e\u3059\u2757\u300d<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u3053\u306e\u9593\u30aa\u30ea\u30a8\u30f3\u30bf\u30eb\u30e9\u30b8\u30aa\u306e\u4e2d\u7530\u3042\u3063\u3061\u3083\u3093\u304c\u904b\u55b6\u3059\u308b\u300c\u30e6\u30fc\u30c1\u30e5\u30fc\u30d6\u5927\u5b66\u300d\u3067ChatGPT 4\u306e\u52d5\u753b\u3092\u898b\u305f\u306e\u3067\u3059\u304c\u3001\u305d\u3053\u3067\u3061\u3087\u3063\u3068\u30c9\u30ad\u30c3\u3068\u3059\u308b\u5185\u5bb9\u3092\u304a\u3063\u3057 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.capilano-fw.com\/?p=11581\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;Laravel + ChatGPT 4 \u3067\u7279\u5b9a\u306e\u30da\u30fc\u30b8\u304c80%\u4ee5\u4e0a\u5909\u66f4\u3055\u308c\u305f\u3089\u901a\u77e5\u3059\u308b\u6a5f\u80fd\u3092\u3064\u304f\u308b&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":11592,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[253,3],"tags":[],"class_list":["post-11581","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-chatgpt","category-laravel"],"_links":{"self":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/11581","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=11581"}],"version-history":[{"count":11,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/11581\/revisions"}],"predecessor-version":[{"id":11599,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/11581\/revisions\/11599"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/media\/11592"}],"wp:attachment":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=11581"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=11581"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=11581"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}