{"id":5260,"date":"2019-12-10T00:02:50","date_gmt":"2019-12-09T15:02:50","guid":{"rendered":"https:\/\/blog.capilano-fw.com\/?p=5260"},"modified":"2021-10-23T17:44:24","modified_gmt":"2021-10-23T08:44:24","slug":"%e3%82%b3%e3%83%94%e3%83%9a%e3%81%a7ok%ef%bc%81laravel%e3%81%8b%e3%82%89wordpress%e3%81%ab%e6%8a%95%e7%a8%bf%e3%81%99%e3%82%8b%e6%a9%9f%e8%83%bd","status":"publish","type":"post","link":"https:\/\/blog.capilano-fw.com\/?p=5260","title":{"rendered":"\u30b3\u30d4\u30da\u3067OK\uff01Laravel \u304b\u3089 WordPress \u306b\u6295\u7a3f\u3059\u308b\u6a5f\u80fd"},"content":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u524d\u56de\u306f<a href=\"https:\/\/blog.capilano-fw.com\/?p=5226\">Laravel\u306b\u30c7\u30fc\u30bf\u767b\u9332\u3055\u308c\u305f\u3089Twitter\u306b\u6295\u7a3f\u3059\u308b<\/a>\u3068\u3044\u3046\u8a18\u4e8b\u3092\u6295\u7a3f\u3057\u307e\u3057\u305f\u304c\u3001\u3053\u306e\u4e2d\u3067\u306f\u5c02\u7528\u306e<code>Notification<\/code>\u3092\u4f5c\u6210\u3057\u3066<code>Twitter<\/code>\u3078\u306e\u6295\u7a3f\u6a5f\u80fd\u3092\u5b9f\u88c5\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p>\u305d\u3057\u3066\u3001\u4eca\u56de\u306f\u3053\u306e<code>Notification<\/code>\u306b\u95a2\u9023\u3059\u308b\u4ee5\u4e0b\u306e\u6a5f\u80fd\u3092\u3064\u304f\u3063\u3066\u307f\u308b\u3053\u3068\u306b\u3057\u307e\u3059\u3002<\/p>\n<p>\u305d\u308c\u306f\u30fb\u30fb\u30fb<\/p>\n<p><strong style=\"font-size: 35px;\">WordPress\u306b\u8a18\u4e8b\u3092\u6295\u7a3f\u3059\u308b\u6a5f\u80fd<\/strong><\/p>\n<p>\u3067\u3059\u3002<\/p>\n<p>\u3053\u308c\u306f\u4f8b\u3048\u3070\u3001\u524d\u56de\u306e\u3088\u3046\u306b\u65b0\u3057\u3044\u5546\u54c1\u304c\u767b\u9332\u3055\u308c\u305f\u3089\u81ea\u52d5\u3067<code>WordPress<\/code>\u3067\u305d\u306e\u5185\u5bb9\u3092\u6295\u7a3f\u3059\u308b\u306a\u3069\u306e\u4f7f\u3044\u65b9\u3092\u60f3\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u305c\u3072\u7686\u3055\u3093\u306e\u304a\u5f79\u306b\u7acb\u3066\u308b\u3068\u5b09\u3057\u3044\u3067\u3059\ud83d\ude0a\u2728<\/p>\n<p><strong>\u3010\u8ffd\u8a18\uff1a2021.10.23\u3011<\/strong><code>composer 2<\/code>\u306e\u300c<strong>\u30d5\u30a1\u30a4\u30eb\u540d\u3068\u30af\u30e9\u30b9\u540d\u304c\u4e00\u81f4\u3059\u308b\u3088\u3046\u306b\u3059\u308b<\/strong>\u300d\u5236\u7d04\uff08\u3057\u304b\u3082\u3001\u5927\u6587\u5b57\uff06\u5c0f\u6587\u5b57\u3082\u5225\u306e\u6587\u5b57\u3068\u3059\u308b\uff09\u306b\u5bfe\u5fdc\u3057\u3066\u30b3\u30fc\u30c9\u3092\u4fee\u6b63\u3057\u307e\u3057\u305f\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3405 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/04\/no_18.png\" alt=\"\" width=\"310\" height=\"320\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/04\/no_18.png 310w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/04\/no_18-291x300.png 291w\" sizes=\"auto, (max-width: 310px) 100vw, 310px\" \/><\/p>\n<p><strong>\u958b\u767a\u74b0\u5883\uff1a<\/strong> Laravel 6.x<\/p>\n<h1>\u3084\u308a\u305f\u3044\u3053\u3068<\/h1>\n<p>\u5192\u982d\u3067\u3082\u66f8\u3044\u305f\u3068\u304a\u308a<code>Laravel<\/code>\u3067<code>WordPress<\/code>\u306e\u8a18\u4e8b\u304c\u6295\u7a3f\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002\u305f\u3060\u3001\u76f4\u63a5\u6295\u7a3f\u3059\u308b\u30b3\u30fc\u30c9\u3092\u66f8\u3044\u3066\u3082\u3044\u3044\u306e\u3067\u3059\u304c\u3001\u305d\u308c\u3060\u3068\u6b21\u56de\u3082\u307e\u305f\u540c\u3058\u30b3\u30fc\u30c9\u3092\u66f8\u304b\u306a\u3044\u3068\u3044\u3051\u306a\u304f\u306a\u308b\u306e\u3067\u3001\u4eca\u56de\u306f<code>Laravel<\/code>\u306e<code>Notification<\/code>\u306b<code>WordPressChannel<\/code>\u3092\u4f5c\u3063\u3066\u3001\u6b21\u304b\u3089\u4f7f\u3044\u56de\u3057\u304c\u3057\u3084\u3059\u3044\u3088\u3046\u306b\u5b9f\u88c5\u3057\u3066\u3044\u304d\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<h1>WordPress\u5074\u306e\u4f5c\u696d<\/h1>\n<p><code>Laravel<\/code>\u3067\u30b3\u30fc\u30c9\u3092\u66f8\u3044\u3066\u3044\u304f\u524d\u306b<code>WordPress<\/code>\u5074\u3067\u6295\u7a3f\u3092\u53d7\u3051\u4ed8\u3051\u308b\u8a2d\u5b9a\u3092\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<p>\u3068\u3044\u3046\u306e\u3082\u3001<code>WordPress<\/code>\u306b\u306f<code>Rest API<\/code>\u3068\u547c\u3070\u308c\u308b\u5916\u90e8\u304b\u3089\u30c7\u30fc\u30bf\u306e\u9001\u53d7\u4fe1\u304c\u3067\u304d\u308b\u6a5f\u80fd\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u72b6\u614b\u3067\u306f\uff08\u52dd\u624b\u306b\u6295\u7a3f\u3055\u308c\u308b\u3068\u554f\u984c\u306a\u306e\u3067\u5f53\u7136\u3067\u3059\u304c\uff09\u5916\u90e8\u304b\u3089\u306f\u30c7\u30fc\u30bf\u53d6\u5f97\u3057\u304b\u3067\u304d\u306a\u3044\u305f\u3081\u3067\u3059\u3002<\/p>\n<h2>\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b<\/h2>\n<p><code>Rest API<\/code>\u3068\u5916\u90e8\u30b5\u30a4\u30c8\u3092\u9023\u643a\u3059\u308b\u306b\u306f\u3044\u304f\u3064\u304b\u65b9\u6cd5\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u4eca\u56de\u306f\u3088\u308a\u30b7\u30f3\u30d7\u30eb\u306b\u5b9f\u88c5\u3067\u304d\u308b\u300c<a href=\"https:\/\/wordpress.org\/plugins\/application-passwords\/\" target=\"_blank\" rel=\"noopener noreferrer\">Application Passwords<\/a>\u300d\u3092\u4f7f\u3063\u3066\u5b9f\u88c5\u3057\u307e\u3059\u3002<\/p>\n<p>\u3067\u306f\u3001<code>WordPress<\/code>\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u30da\u30fc\u30b8\u304b\u3089\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3057\u3066\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u691c\u7d22\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5266\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/12\/wordpress_notification_1.png\" alt=\"\" width=\"625\" height=\"536\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/12\/wordpress_notification_1.png 625w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/12\/wordpress_notification_1-300x257.png 300w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><\/p>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5b8c\u4e86\u3059\u308b\u3068\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u4e00\u89a7\u30da\u30fc\u30b8\u3067\u6709\u52b9\u5316\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5265\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/12\/wordpress_notification_2.png\" alt=\"\" width=\"906\" height=\"68\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/12\/wordpress_notification_2.png 906w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/12\/wordpress_notification_2-300x23.png 300w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/12\/wordpress_notification_2-768x58.png 768w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/p>\n<p>\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u6709\u52b9\u5316\u3057\u305f\u3089\u3001\u753b\u9762\u5de6\u306e\u30e1\u30cb\u30e5\u30fc\u304b\u3089\u300c\u30e6\u30fc\u30b6\u30fc &gt; \u3042\u306a\u305f\u306e\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u300d\u3092\u30af\u30ea\u30c3\u30af\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5264\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/12\/wordpress_notification_3.png\" alt=\"\" width=\"158\" height=\"129\" \/><\/p>\n<p>\u3059\u308b\u3068\u3001\u753b\u9762\u4e00\u756a\u4e0b\u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306b<strong>\u300cApplication Passwords\u300d<\/strong>\u3068\u3044\u3046\u9805\u76ee\u304c\u3042\u308b\u306e\u3067\u3001<strong>\u300cLaravel Notification\u300d<\/strong>\u306a\u3069\u5f8c\u3067\u5224\u5225\u3057\u3084\u3059\u3044\u540d\u524d\u3092\u5165\u529b\u3057\u3066<strong>\u300cAdd New\u300d<\/strong>\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5267\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/12\/wordpress_notification_4.png\" alt=\"\" width=\"491\" height=\"151\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/12\/wordpress_notification_4.png 491w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/12\/wordpress_notification_4-300x92.png 300w\" sizes=\"auto, (max-width: 491px) 100vw, 491px\" \/><\/p>\n<p>\u3059\u308b\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30dd\u30c3\u30d7\u30a2\u30c3\u30d7\u304c\u8868\u793a\u3055\u308c\u3066\u3001\u305d\u306e\u4e2d\u306b\u30d1\u30b9\u30ef\u30fc\u30c9\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002\u6b21\u306e\u8a2d\u5b9a\u3067\u5fc5\u8981\u306a\u306e\u3067\u30b3\u30d4\u30fc\u3057\u3066\u304a\u3044\u3066\u304f\u3060\u3055\u3044\u3002\uff08\u4e00\u5ea6\u9589\u3058\u308b\u3068\uff12\u5ea6\u3068\u8868\u793a\u3055\u305b\u308b\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093\uff09<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5262\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/12\/wordpress_notification_5.png\" alt=\"\" width=\"484\" height=\"179\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/12\/wordpress_notification_5.png 484w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/12\/wordpress_notification_5-300x111.png 300w\" sizes=\"auto, (max-width: 484px) 100vw, 484px\" \/><\/p>\n<h1>Laravel\u5074\u306e\u4f5c\u696d<\/h1>\n<p>\u3067\u306f\u3001\u3053\u3053\u304b\u3089\u304c<code>Laravel<\/code>\u5074\u306e\u4f5c\u696d\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2>.env\u3068\u30b3\u30f3\u30d5\u30a3\u30b0\u30d5\u30a1\u30a4\u30eb\u306e\u8a2d\u5b9a<\/h2>\n<p><code>.env<\/code>\u306b<code>WordPress<\/code>\u306e\u30e6\u30fc\u30b6\u30fc\u540d\uff08\u30ed\u30b0\u30a4\u30f3\u306e\u6642\u306b\u3064\u304b\u3046\u540d\u524d\uff09\u3001\u5148\u307b\u3069<code>Application Passwords<\/code>\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6642\u306b\u53d6\u5f97\u3057\u305f\u30d1\u30b9\u30ef\u30fc\u30c9\u3001<code>Rest API<\/code>\u306eURL\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><strong>WP_API_USERNAME=root<\/strong>\r\n<strong>WP_API_PASSWORD=\"**** **** **** **** **** ****\"<\/strong>\r\n<strong>WP_API_URL=http:\/\/wordpress.example.com\/wp-json\/wp\/v2\/posts<\/strong><\/pre>\n<p>\u306a\u304a\u3001\u3053\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u306f<code>config<\/code>\u304c\u30ad\u30e3\u30c3\u30b7\u30e5\u3055\u308c\u3066\u3082\u3044\u3044\u3088\u3046\u306b<code>config\/services.php<\/code>\u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u767b\u9332\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre>&lt;?php\r\n\r\nreturn [\r\n\r\n    \/\/ \u7701\u7565\r\n\r\n    <strong>'wordpress' =&gt; [<\/strong>\r\n<strong>        'username' =&gt; env('WP_API_USERNAME'),<\/strong>\r\n<strong>        'password' =&gt; env('WP_API_PASSWORD'),<\/strong>\r\n<strong>        'url' =&gt; env('WP_API_URL'),<\/strong>\r\n<strong>    ],<\/strong>\r\n\r\n];<\/pre>\n<h2>\u5c02\u7528\u306eWordPressChannel\u3092\u3064\u304f\u308b<\/h2>\n<p>\u3067\u306f\u3001\u7d9a\u3044\u3066<code>Notification<\/code>\u3067\u4f7f\u3046\u5c02\u7528\u306e<code>Channel<\/code>\u3092\u3064\u304f\u3063\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><code>app\/Channels\/WordPressChannel.php<\/code>\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u3092\u3064\u304f\u3063\u3066\u4e2d\u8eab\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><strong>&lt;?php\r\n\r\nnamespace App\\Channels;\r\n\r\nuse Illuminate\\Notifications\\Notification;\r\n\r\nclass WordPressChannel\r\n{\r\n    \/**\r\n     * Send the given notification.\r\n     *\r\n     * @param  mixed  $notifiable\r\n     * @param  \\Illuminate\\Notifications\\Notification  $notification\r\n     * @return void\r\n     *\/\r\n    public function send($notifiable, Notification $notification)\r\n    {\r\n        $result = $notification-&gt;toWordPress($notifiable);\r\n        \/\/ $result\u306b\u306f\u3001\u6295\u7a3f\u3055\u308c\u305f\u7d50\u679c\u304c\u5165\u3063\u3066\u3044\u307e\u3059\r\n        \/\/ dd($result);\r\n    }\r\n}<\/strong><\/pre>\n<h2>Notification\u3092\u3064\u304f\u308b<\/h2>\n<p>\u7d9a\u3044\u3066\u3001<code>Notification<\/code>\u3092\u3064\u304f\u308a\u307e\u3059\u3002<br \/>\n\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><strong>php artisan make:notification WordPressNotification<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u3001<code>app\/Notifications\/WordPressNotification.php<\/code>\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c\u308b\u306e\u3067\u3001\u4e2d\u8eab\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><strong>&lt;?php<\/strong>\r\n\r\n<strong>namespace App\\Notifications;<\/strong>\r\n\r\n<strong>use App\\Channels\\WordPressChannel;<\/strong>\r\n<strong>use Illuminate\\Bus\\Queueable;<\/strong>\r\n<strong>use Illuminate\\Contracts\\Queue\\ShouldQueue;<\/strong>\r\n<strong>use Illuminate\\Notifications\\Messages\\MailMessage;<\/strong>\r\n<strong>use Illuminate\\Notifications\\Notification;<\/strong>\r\n\r\n<strong>class WordPressNotification extends Notification<\/strong>\r\n<strong>{<\/strong>\r\n<strong>    use Queueable;<\/strong>\r\n\r\n<strong>    private $post_data;<\/strong>\r\n\r\n<strong>    public function __construct($post_data)<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        $this-&gt;post_data = $post_data;<\/strong>\r\n<strong>    }<\/strong>\r\n\r\n<strong>    public function via($notifiable)<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        return [WordPressChannel::class];<\/strong>\r\n<strong>    }<\/strong>\r\n\r\n<strong>    public function toWordPress($notifiable) {<\/strong>\r\n\r\n<strong>        $api_url = config('services.wordpress.url');<\/strong>\r\n<strong>        $username = config('services.wordpress.username');<\/strong>\r\n<strong>        $password = config('services.wordpress.password');<\/strong>\r\n<strong>        $data = http_build_query($this-&gt;post_data);<\/strong>\r\n<strong>        $headers = [<\/strong>\r\n<strong>            'Authorization: Basic '. base64_encode($username .':'. $password),<\/strong>\r\n<strong>            'Content-Type: application\/x-www-form-urlencoded',<\/strong>\r\n<strong>            'Content-Length: '. strlen($data)<\/strong>\r\n<strong>        ];<\/strong>\r\n<strong>        $options = [<\/strong>\r\n<strong>            'http' =&gt; [<\/strong>\r\n<strong>                'method' =&gt; 'POST',<\/strong>\r\n<strong>                'header' =&gt; implode(\"\\r\\n\", $headers),<\/strong>\r\n<strong>                'content' =&gt; $data<\/strong>\r\n<strong>            ]<\/strong>\r\n<strong>        ];<\/strong>\r\n<strong>        $context = stream_context_create($options);<\/strong>\r\n<strong>        $json = file_get_contents($api_url, false, $context);<\/strong>\r\n<strong>        return json_decode($json, true);<\/strong>\r\n\r\n<strong>    }<\/strong>\r\n<strong>}<\/strong><\/pre>\n<p>\u3053\u308c\u3067\u4f5c\u696d\u306f\u5b8c\u4e86\u3067\u3059\u3002<br \/>\n\u5b9f\u969b\u306b\u6295\u7a3f\u3092\u3057\u3066\u307f\u307e\u3057\u3087\u3046\uff01<\/p>\n<h1>\u4f7f\u3044\u65b9<\/h1>\n<p>\u4f7f\u3044\u65b9\u306f\u7c21\u5358\u3067\u3001\u6b21\u306e\u3088\u3046\u306b<code>WordPressNotification<\/code>\u306b\u9001\u4fe1\u5185\u5bb9\u3092\u30bb\u30c3\u30c8\u3059\u308b\u3060\u3051\u3067\u3059\u3002<\/p>\n<pre><strong>$post_data = [<\/strong>\r\n<strong>    'title' =&gt; '\u30c6\u30b9\u30c8\u6295\u7a3f\u3067\u3059',<\/strong>\r\n<strong>    'content' =&gt; '\u30c6\u30b9\u30c8\u6295\u7a3f from Laravel\uff08'. date('Y-m-d H:i:s') .'\uff09',<\/strong>\r\n<strong>    'status' =&gt; 'publish'<\/strong>\r\n<strong>];<\/strong>\r\n<strong>\\Notification::route('wordpress', null)<\/strong>\r\n<strong>    -&gt;notify(new WordPressNotification($post_data));<\/strong><\/pre>\n<p>\u3067\u306f\u5b9f\u884c\u3057\u3066<code>WordPress<\/code>\u3092\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5269\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/12\/wordpress_notification_7.png\" alt=\"\" width=\"434\" height=\"130\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/12\/wordpress_notification_7.png 434w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/12\/wordpress_notification_7-300x90.png 300w\" sizes=\"auto, (max-width: 434px) 100vw, 434px\" \/><\/p>\n<p>\u3046\u307e\u304f\u3044\u304d\u307e\u3057\u305f\u3002<br \/>\n\u304a\u75b2\u308c\u69d8\u3067\u3057\u305f\ud83d\ude0a\u2728<\/p>\n<h1>\u304a\u308f\u308a\u306b<\/h1>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u4eca\u56de\u306f<code>Laravel<\/code>\u304b\u3089<code>WordPress<\/code>\u306b\u8a18\u4e8b\u3092\u6295\u7a3f\u3092\u3059\u308b\u65b9\u6cd5\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u3053\u306e\u6a5f\u80fd\u3092\u4f7f\u3048\u3070\u3001\u304a\u5ba2\u3055\u3093\u3084\u30e6\u30fc\u30b6\u30fc\u3055\u3093\u305f\u3061\u3078\u306e\u544a\u77e5\u306a\u3069\u69d8\u3005\u306a\u4f7f\u3044\u65b9\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u305c\u3072\u7686\u3055\u3093\u3082\u4eca\u56de\u306e\u8a18\u4e8b\u3092\u53c2\u8003\u306b\u3057\u3066<code>WordPress<\/code>\u306b\u8a18\u4e8b\u3092\u6295\u7a3f\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u306d\u3002<\/p>\n<p>\u3067\u306f\u3067\u306f\u301c\uff01<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3467 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/04\/no_9.png\" alt=\"\" width=\"216\" height=\"320\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/04\/no_9.png 216w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/04\/no_9-203x300.png 203w\" sizes=\"auto, (max-width: 216px) 100vw, 216px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u524d\u56de\u306fLaravel\u306b\u30c7\u30fc\u30bf\u767b\u9332\u3055\u308c\u305f\u3089Twitter\u306b\u6295\u7a3f\u3059\u308b\u3068\u3044\u3046\u8a18\u4e8b\u3092\u6295\u7a3f\u3057\u307e\u3057\u305f\u304c\u3001\u3053\u306e\u4e2d\u3067\u306f\u5c02\u7528\u306eNotification\u3092\u4f5c\u6210\u3057\u3066Twit &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.capilano-fw.com\/?p=5260\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;\u30b3\u30d4\u30da\u3067OK\uff01Laravel \u304b\u3089 WordPress \u306b\u6295\u7a3f\u3059\u308b\u6a5f\u80fd&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":5271,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,59],"tags":[193],"class_list":["post-5260","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-laravel","category-wordpress","tag-notification"],"_links":{"self":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/5260","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=5260"}],"version-history":[{"count":5,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/5260\/revisions"}],"predecessor-version":[{"id":9742,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/5260\/revisions\/9742"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/media\/5271"}],"wp:attachment":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5260"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5260"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5260"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}