{"id":10262,"date":"2022-04-04T07:00:26","date_gmt":"2022-04-03T22:00:26","guid":{"rendered":"https:\/\/blog.capilano-fw.com\/?p=10262"},"modified":"2025-02-15T20:03:17","modified_gmt":"2025-02-15T11:03:17","slug":"wordpress-laravel-%e3%81%a7%e3%80%8c%e3%83%98%e3%83%83%e3%83%89%e3%83%ac%e3%82%b9-cms%e3%80%8d%e3%82%92%e3%81%a4%e3%81%8f%e3%82%8b","status":"publish","type":"post","link":"https:\/\/blog.capilano-fw.com\/?p=10262","title":{"rendered":"WordPress + Laravel \u3067\u300c\u30d8\u30c3\u30c9\u30ec\u30b9 CMS\u300d\u3092\u3064\u304f\u308b"},"content":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u6700\u8fd1\u7279\u306b<code>Twitter<\/code>\u304b\u3089\u60c5\u5831\u3092\u5f97\u3066\u3044\u308b\u3068\u6700\u65b0\u60c5\u5831\u304c\u8c4a\u5bcc\u306a\u306e\u3067\u300c<strong>\u6642\u4ee3\u306b\u53d6\u308a\u6b8b\u3055\u308c\u306b\u304f\u304f\u306a\u308b<\/strong>\u300d\u3088\u3046\u306a\u6c17\u304c\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3057\u304b\u3082\u3001\u512a\u79c0\u306a\u65b9\u3005\u306e\u30c4\u30a4\u30fc\u30c8\u306f\u304a\u91d1\u3092\u6255\u3063\u3066\u3067\u3082\u307b\u3057\u3044\u3068\u601d\u3048\u308b\u3088\u3046\u306a\u3082\u306e\u304c\u3042\u3063\u305f\u308a\u3082\u3057\u307e\u3059\u3002\uff08\u305d\u308c\u306b\u3057\u3066\u3082\u3001\u3042\u3042\u3044\u3046\u8d85\u512a\u79c0\u306a\u65b9\u3005\u306f\u30db\u30f3\u30c8\u4f55\u8005\u306a\u3093\u3067\u3057\u3087\u3046\u304b\u2026\ud83d\ude02\uff09<\/p>\n<p>\u305d\u3057\u3066\u3001\u305d\u3093\u306a\u60c5\u5831\u53ce\u96c6\u306e\u4e2d\u3067\u6c17\u306b\u306a\u3063\u305f\u306e\u304c\u3001<\/p>\n<p><strong style=\"font-size: 35px;\">\u30d8\u30c3\u30c9\u30ec\u30b9 CMS<\/strong><\/p>\n<p>\u300c<strong>\u30d8\u30c3\u30c9\u30ec\u30b9 CMS<\/strong>\u300d\u3068\u306f\u3001\u7c21\u5358\u306b\u3044\u3046\u3068\u300c<strong>\u30b3\u30f3\u30c6\u30f3\u30c4\u90e8\u5206\u3060\u3051\u7ba1\u7406\u3059\u308b\u5225\u30b5\u30a4\u30c8<\/strong>\u300d\u3067\u3001\u4f8b\u3048\u3070\u300c<strong>\u30e6\u30fc\u30b6\u30fc\u3078\u306e\u304a\u77e5\u3089\u305b\u90e8\u5206\u3060\u3051\u7ba1\u7406\u3067\u304d\u308b\u30b5\u30a4\u30c8<\/strong>\u300d\u3092\u30a4\u30e1\u30fc\u30b8\u3059\u308b\u3068\u5206\u304b\u308a\u3084\u3059\u3044\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n<p>\u305d\u3057\u3066\u3001\u305d\u3093\u306a\u300c<strong>\u30d8\u30c3\u30c9\u30ec\u30b9 CMS<\/strong>\u300d\u306f\u3059\u3067\u306b\u65e5\u672c\u7248\u30b5\u30fc\u30d3\u30b9\u304c\u51fa\u3066\u308b\u3050\u3089\u3044\u6d78\u900f\u3057\u3066\u304d\u3066\u3044\u308b\u306e\u3067\u3059\u304c\u3001\u305d\u306e\u3068\u304d\u3042\u308b\u3053\u3068\u304c\u3072\u3089\u3081\u304d\u307e\u3057\u305f\u3002<\/p>\n<p><span style=\"font-size: 35px;\"><b>\u300c\u3053\u308c\u3001<strong style=\"font-size: 35px;\">WordPress\u3067\u4f5c\u308c\u308b\u3093\u3058\u3083\u306a\u3044\uff1f\uff1f<\/strong>\u300d<\/b><\/span><\/p>\n<p>\u3068\u3002<\/p>\n<p>\u305d\u3053\u3067\u2757<\/p>\n<p>\u4eca\u56de\u306f\u3001<code>WordPress<\/code> + <code>Laravel<\/code> \u3067\u30b7\u30f3\u30d7\u30eb\u306a\u300c<strong>\u30d8\u30c3\u30c9\u30ec\u30b9 CMS<\/strong>\u300d\u3092\u3064\u304f\u3063\u3066\u307f\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 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\u30b7\u30e3\u30a6\u30a8\u30c3\u30bb\u30f3 with<br \/>\n\u30cf\u30a4\u30f3\u30c4\u306e\u30b1\u30c3\u30c1\u30e3\u30c3\u30d7<br \/>\n\u304c\u3046\u307e\u304f\u3066\u4ed5\u65b9\u304c\u306a\u3044\u2026\u300d<\/p>\n<p><strong>\u958b\u767a\u74b0\u5883\uff1a<\/strong> WordPress 5.9.2\u3001Laravel 9.x<\/p>\n<h1>\u3084\u308a\u305f\u3044\u3053\u3068<\/h1>\n<p>\u4eca\u56de\u5b9f\u88c5\u3059\u308b\u5185\u5bb9\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<ul>\n<li>\u901a\u5e38\u306e\u30d6\u30ed\u30b0\u8868\u793a\u306f\u7121\u52b9\u306b\u3059\u308b<\/li>\n<li>\u4ed6\u306e\u30b5\u30a4\u30c8\u304b\u3089\u306f\u30a2\u30af\u30bb\u30b9\u3067\u304d\u306a\u3044\u3088\u3046\u8a8d\u8a3c\u3092\u3064\u3051\u308b<\/li>\n<li>\u5225\u30b5\u30a4\u30c8\u306e\u300c\u304a\u77e5\u3089\u305b\u300d\u3092\u7ba1\u7406\u3059\u308b<\/li>\n<\/ul>\n<p>\u3064\u307e\u308a\u3001\u6d41\u308c\u3068\u3057\u3066\u306f\u3053\u3046\u306a\u308a\u307e\u3059\u3002<\/p>\n<ol>\n<li>WordPress \u3067\u304a\u77e5\u3089\u305b\u8a18\u4e8b\u3092\u66f8\u304f<\/li>\n<li>Laravel \u5074\u304b\u3089\u30c7\u30fc\u30bf\u3092\u53d6\u5f97<\/li>\n<li>\u300c\u304a\u77e5\u3089\u305b\u300d\u3068\u3057\u3066\u8868\u793a<\/li>\n<\/ol>\n<p>\u3067\u306f\u3001\u4eca\u56de\u3082\u697d\u3057\u304f\u3084\u3063\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u2757<\/p>\n<h1>\u5c02\u7528\u30c6\u30fc\u30de\u3092\u3064\u304f\u308b<\/h1>\n<p>\u307e\u305a\u3001\u300c<strong>\u901a\u5e38\u306e\u30d6\u30ed\u30b0\u8868\u793a\u306f\u7121\u52b9\u306b\u3059\u308b<\/strong>\u300d\u90e8\u5206\u304b\u3089\u3064\u304f\u3063\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<p>\u4eca\u56de\u306f\u30d6\u30ed\u30b0\u8a18\u4e8b\u306f\u8868\u793a\u3057\u307e\u305b\u3093\u306e\u3067\u3001\u72ec\u81ea\u306b<code>WordPress<\/code>\u306e\u30c6\u30fc\u30de\u3092\u3064\u304f\u308a\u3001\u3055\u3089\u306b\u3001\u3082\u3057\u30a2\u30af\u30bb\u30b9\u3055\u308c\u3066\u3082\u3001<code>Rest API<\/code>\u306e\u30c8\u30c3\u30d7\u30da\u30fc\u30b8\u3078\u5f37\u5236\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3059\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<p>\u307e\u305a\u306f\u3001<code>wp-content\/themes<\/code>\u306e\u4e2d\u3078\u300c<strong>headless_cms<\/strong>\u300d\u3068\u3044\u3046\u30d5\u30a9\u30eb\u30c0\u3092\u3064\u304f\u308a\u3001\u3055\u3089\u306b\u305d\u306e\u4e2d\u3078\u300c<strong>index.php<\/strong>\u300d\u3068\u300c<strong>style.css<\/strong>\u300d\u3092\u3064\u304f\u308a\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10263\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/03\/wordpress_as_headless_cms_1.png\" alt=\"\" width=\"331\" height=\"220\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/03\/wordpress_as_headless_cms_1.png 331w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/03\/wordpress_as_headless_cms_1-300x199.png 300w\" sizes=\"auto, (max-width: 331px) 100vw, 331px\" \/><\/p>\n<p>\u305d\u3057\u3066\u3001\u5404\u30d5\u30a1\u30a4\u30eb\u306e\u4e2d\u8eab\u3092\u5909\u66f4\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><strong>wp-content\/themes\/headless_cms\/style.css<\/strong><\/p>\n<pre><strong>\/*<\/strong>\n<strong>Theme Name: Headless CMS<\/strong>\n<strong>*\/<\/strong><\/pre>\n<p><strong>wp-content\/themes\/headless_cms\/index.php<\/strong><\/p>\n<pre><strong>&lt;?php<\/strong>\n\n<strong>$url = get_rest_url(null, 'wp\/v2\/');<\/strong>\n<strong>wp_redirect($url); \/\/ Rest API \u3078\u30ea\u30c0\u30a4\u30ec\u30af\u30c8<\/strong>\n<strong>die();<\/strong><\/pre>\n<p>\u3053\u308c\u3067\u72ec\u81ea\u30c6\u30fc\u30de\u4f5c\u6210\u306f\u5b8c\u4e86\u3067\u3059\u3002<br \/>\n\u3067\u306f\u3001\u5b9f\u969b\u306b\u30c6\u30fc\u30de\u3092\u300c<strong>Headless CMS<\/strong>\u300d\u3078\u5909\u66f4\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u2757<\/p>\n<p>WordPress\u7ba1\u7406\u30da\u30fc\u30b8\u306e\u30da\u30fc\u30b8\u5de6\u5074\u306b\u8868\u793a\u3055\u308c\u3066\u3044\u308b\u30e1\u30cb\u30e5\u30fc\u306e\u4e2d\u304b\u3089\u3001\u300c<strong>\u5916\u89b3 \uff1e \u30c6\u30fc\u30de<\/strong>\u300d\u3092\u30af\u30ea\u30c3\u30af\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10265\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/03\/wordpress_as_headless_cms_3.png\" alt=\"\" width=\"152\" height=\"421\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/03\/wordpress_as_headless_cms_3.png 152w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/03\/wordpress_as_headless_cms_3-108x300.png 108w\" sizes=\"auto, (max-width: 152px) 100vw, 152px\" \/><\/p>\n<p>\u3059\u308b\u3068\u3001\u30c6\u30fc\u30de\u4e00\u89a7\u304c\u8868\u793a\u3055\u308c\u308b\u306e\u3067\u3001\u305d\u306e\u4e2d\u304b\u3089\u300c<strong>Headless CMS<\/strong>\u300d\u3092\u6709\u52b9\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10264\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/03\/wordpress_as_headless_cms_2.png\" alt=\"\" width=\"640\" height=\"357\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/03\/wordpress_as_headless_cms_2.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/03\/wordpress_as_headless_cms_2-300x167.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u3053\u308c\u3067\u3001<code>WordPress<\/code>\u30c8\u30c3\u30d7\u30da\u30fc\u30b8\u3078\u30a2\u30af\u30bb\u30b9\u3057\u3066\u3082<code>Rest API<\/code>\u306e\u30c8\u30c3\u30d7\u30da\u30fc\u30b8\u3078\u81ea\u52d5\u7684\u306b\u8ee2\u9001\u3055\u308c\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h1>Rest API \u3092\u30ed\u30b0\u30a4\u30f3\u5fc5\u9808\u306b\u3059\u308b<\/h1>\n<p>\u7d9a\u3044\u3066\u3001\u300c<strong>\u4ed6\u306e\u30b5\u30a4\u30c8\u304b\u3089\u306f\u30a2\u30af\u30bb\u30b9\u3067\u304d\u306a\u3044\u3088\u3046\u306b\u3059\u308b<\/strong>\u300d\u90e8\u5206\u3067\u3059\u3002<\/p>\n<p>\u307e\u305a\u306f\u3001\u5148\u307b\u3069\u3064\u304f\u3063\u305f\u72ec\u81ea\u30c6\u30fc\u30de\u306e\u4e2d\u306b\u4ee5\u4e0b\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><strong>wp-content\/themes\/headless_cms\/functions.php<\/strong><\/p>\n<pre><strong>&lt;?php<\/strong>\n\n<strong>\/\/ \u76f4\u63a5\u30a2\u30af\u30bb\u30b9\u7981\u6b62\uff08\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u5bfe\u7b56\uff09<\/strong>\n<strong>if(!defined('ABSPATH')) {<\/strong>\n\n<strong>    exit;<\/strong>\n\n<strong>}<\/strong>\n<strong>\n\/\/ Rest API \u3092\u30ed\u30b0\u30a4\u30f3\u5fc5\u9808\u306b\u3059\u308b\nadd_filter('rest_authentication_errors', function($result) {\n\n    if(!is_user_logged_in()) {\n\n        return new WP_Error(\n            'rest_not_logged_in',\n            'You are not currently logged in.',\n            ['status' =&gt; 401]\n        );\n\n    }\n\n    return $result;\n\n});<\/strong><\/pre>\n<p>\u3053\u308c\u3067\u30ed\u30b0\u30a4\u30f3\u8a8d\u8a3c\u3055\u308c\u3066\u3044\u306a\u3044\u5834\u5408\u306f\u30a2\u30af\u30bb\u30b9\u304c\u3067\u304d\u306a\u304f\u306a\u308a\u307e\u3059\u304c\u3001\u3067\u306f\u3069\u3046\u3084\u3063\u3066\u8a8d\u8a3c\u3092\u3059\u308b\u304b\u3068\u3044\u3046\u3068\u300c<strong>Application Password<\/strong>\u300d\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<p><code>Application Password<\/code>\u306f\u3001\u7c21\u5358\u306b\u8a00\u3046\u3068\u300c<strong>\u4e00\u90e8\u306e\u6a5f\u80fd\u3060\u3051\u306b\u4f7f\u3048\u308b\u30ed\u30b0\u30a4\u30f3\u30fb\u30d1\u30b9\u30ef\u30fc\u30c9<\/strong>\u300d\u3067\u3059\u3002\uff08\u3064\u307e\u308a\u3001<code>WordPress<\/code>\u306e\u7ba1\u7406\u30da\u30fc\u30b8\u306b\u30ed\u30b0\u30a4\u30f3\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093\uff09<\/p>\n<p>\u3067\u306f\u3001\u30da\u30fc\u30b8\u5de6\u5074\u30e1\u30cb\u30e5\u30fc\u304b\u3089\u300c<strong>\u30e6\u30fc\u30b6\u30fc \uff1e \u30d7\u30ed\u30d5\u30a3\u30fc\u30eb<\/strong>\u300d\u3078\u79fb\u52d5\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10269\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/03\/wordpress_as_headless_cms_4.png\" alt=\"\" width=\"148\" height=\"282\" \/><\/p>\n<p>\u3059\u308b\u3068\u3001\u30da\u30fc\u30b8\u6700\u4e0b\u90e8\u306b\u300c<strong>\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30d1\u30b9\u30ef\u30fc\u30c9<\/strong>\u300d\u3068\u3044\u3046\u9805\u76ee\u304c\u3042\u308b\u306e\u3067\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u540d\u306b\u300c<strong>Headless CMS<\/strong>\u300d\u3068\u5165\u529b\u3057\u3001\u300c<strong>\u65b0\u3057\u3044\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u8ffd\u52a0<\/strong>\u300d\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10268\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/03\/wordpress_as_headless_cms_5.png\" alt=\"\" width=\"424\" height=\"328\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/03\/wordpress_as_headless_cms_5.png 424w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/03\/wordpress_as_headless_cms_5-300x232.png 300w\" sizes=\"auto, (max-width: 424px) 100vw, 424px\" \/><\/p>\n<p>\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30fb\u30d1\u30b9\u30ef\u30fc\u30c9\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u306e\u3067\u3001\u5927\u5207\u306b\u4fdd\u7ba1\u3057\u3066\u304a\u3044\u3066\u304f\u3060\u3055\u3044\u3002\uff08\u4e8c\u5ea6\u3068\u8868\u793a\u3055\u308c\u307e\u305b\u3093\uff09<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10267\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/03\/wordpress_as_headless_cms_6.png\" alt=\"\" width=\"536\" height=\"111\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/03\/wordpress_as_headless_cms_6.png 536w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/03\/wordpress_as_headless_cms_6-300x62.png 300w\" sizes=\"auto, (max-width: 536px) 100vw, 536px\" \/><\/p>\n<p>\u3061\u306a\u307f\u306b\u3001\u3053\u306e<code>Application Password<\/code>\u306f\u3001<strong><code>WordPress<\/code>\u304c<code>HTTPS<\/code>\u3067\u63a5\u7d9a\u3055\u308c\u3066\u3044\u306a\u3044\u3068\u6709\u52b9\u306b\u3067\u304d\u307e\u305b\u3093<\/strong>\u306e\u3067\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u3067\u306f\u3001\u3053\u308c\u3067<code>WordPress<\/code>\u5074\u306e\u8a2d\u5b9a\u306f\u5b8c\u4e86\u3067\u3059\u3002<br \/>\n\u6b21\u306f<code>Laravel<\/code>\u3078\u884c\u3063\u3066\u307f\u307e\u3057\u3087\u3046\u2757<\/p>\n<h1>Laravel \u304b\u3089 Rest API \u3078\u30a2\u30af\u30bb\u30b9\u3057\u30c7\u30fc\u30bf\u53d6\u5f97\u3059\u308b<\/h1>\n<p>\u7d9a\u3044\u3066\u3001<code>Laravel<\/code>\u304b\u3089\u3001<code>WordPress<\/code>\u306e<code>Rest API<\/code>\u3078\u30a2\u30af\u30bb\u30b9\u3057\u3001\u300c<strong>\u304a\u77e5\u3089\u305b<\/strong>\u300d\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<p>\u203b \u306a\u304a\u3001<code>JavaScript<\/code>\u304b\u3089\u3067\u3082\u76f4\u63a5\u53d6\u5f97\u306f\u3067\u304d\u307e\u3059\u304c\u3001\u305d\u3046\u306a\u308b\u3068\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30fb\u30d1\u30b9\u30ef\u30fc\u30c9\u304c\u30c0\u30c0\u6f0f\u308c\u306b\u306a\u308a\u307e\u3059\u306e\u3067\u3001\u4eca\u56de\u306e\u30b1\u30fc\u30b9\u3067\u306f\u5b9f\u88c5\u3057\u306a\u3044\u3088\u3046\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h2>\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3092\u3064\u304f\u308b<\/h2>\n<p>\u3067\u306f\u3001\u307e\u305a\u306f\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3067\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:controller HeadlessCmsController<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u3001\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c\u308b\u306e\u3067\u3001\u4e2d\u8eab\u3092\u6b21\u306e\u3088\u3046\u306b\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n<p><strong>app\/Http\/Controllers\/HeadlessCmsController.php<\/strong><\/p>\n<pre><strong>&lt;?php<\/strong>\n\n<strong>namespace App\\Http\\Controllers;<\/strong>\n\n<strong>use Illuminate\\Http\\Request;<\/strong>\n<strong>use Illuminate\\Support\\Facades\\Http;<\/strong>\n\n<strong>class HeadlessCmsController extends Controller<\/strong>\n<strong>{<\/strong>\n<strong>    public function index(Request $request)<\/strong>\n<strong>    {<\/strong>\n<strong>        $page = intval($request-&gt;input('page', 1));<\/strong>\n<strong>        $per_page = intval($request-&gt;input('per_page', 10));<\/strong>\n\n<strong>        $username = 'root'; \/\/ Application Password \u3092\u3064\u304f\u3063\u305f\u3068\u304d\u306e\u30ed\u30b0\u30a4\u30f3\u30e6\u30fc\u30b6\u30fc\u540d<\/strong>\n<strong>        $application_password = 'ioOe kYj5 scp6 qzTj jYQM pT3h'; \/\/ \u672c\u6765\u306f .env \u306b\u66f8\u304f\u3079\u304d\u3067\u3059<\/strong>\n<strong>        $authorization = 'Basic ' . base64_encode($username . ':' . $application_password);<\/strong>\n<strong>        $url = 'https:\/\/cms.wp59.test\/wp-json\/wp\/v2\/posts';<\/strong>\n<strong>        $should_verify = ! app()-&gt;environment('local');<\/strong>\n<strong>        $category_ids = [3]; \/\/ \u53d6\u5f97\u3057\u305f\u3044\u30b5\u30a4\u30c8\u306e\u30ab\u30c6\u30b4\u30ea ID\uff08\u9069\u5b9c\u5909\u66f4\u3057\u3066\u304f\u3060\u3055\u3044\uff09<\/strong>\n\n<strong>        $response = Http::withHeaders(['Authorization' =&gt; $authorization])<\/strong>\n<strong>            -&gt;withOptions(['verify' =&gt; $should_verify])<\/strong>\n<strong>            -&gt;get($url, [<\/strong>\n<strong>                '_fields' =&gt; 'id,title,content',<\/strong>\n<strong>                'categories' =&gt; implode(',', $category_ids),<\/strong>\n<strong>                'page' =&gt; $page,<\/strong>\n<strong>                'per_page' =&gt; $per_page,<\/strong>\n<strong>                'orderby' =&gt; 'date',<\/strong>\n<strong>                'order' =&gt; 'desc',<\/strong>\n<strong>            ]);<\/strong>\n\n<strong>        if($response-&gt;ok()) {<\/strong>\n\n<strong>            return [<\/strong>\n<strong>                'data' =&gt; $response-&gt;json(),<\/strong>\n<strong>                'pagination' =&gt; [<\/strong>\n<strong>                    'total' =&gt; $response-&gt;header('X-WP-Total'),<\/strong>\n<strong>                    'total_pages' =&gt; $response-&gt;header('X-WP-TotalPages'),<\/strong>\n<strong>                ],<\/strong>\n<strong>            ];<\/strong>\n\n<strong>        }<\/strong>\n\n<strong>        abort(500, 'Failed to get posts.');<\/strong>\n<strong>    }<\/strong>\n\n<strong>}<\/strong><\/pre>\n<p>\u3053\u306e\u4e2d\u3067\u306f\u3001<code>Laravel<\/code>\u306e<code>HTTP Client<\/code>\uff08<code>guzzle<\/code>\uff09\u3092\u4f7f\u3063\u3066\u30a2\u30af\u30bb\u30b9\u3057\u3066\u3044\u308b\u3060\u3051\u3067\u3059\u306e\u3067\u3001\u30b7\u30f3\u30d7\u30eb\u306a\u30b3\u30fc\u30c9\u306b\u306a\u3063\u3066\u3044\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u305f\u3060\u3001\u4e00\u70b9\u6c17\u3092\u3064\u3051\u3066\u3044\u305f\u3060\u304d\u305f\u3044\u306e\u304c\u3001\u4ee5\u4e0b\u306e\u90e8\u5206\u3067\u3059\u3002<\/p>\n<pre><strong>-&gt;withOptions(['verify' =&gt; $should_verify])<\/strong><\/pre>\n<p>\u3053\u308c\u306f\u300c<strong>\u30b5\u30fc\u30d0\u30fc\u8a3c\u660e\u66f8\u306e\u691c\u8a3c<\/strong>\u300d\u3092\u5b9f\u884c\u3059\u308b or \u3057\u306a\u3044\u3092\u6c7a\u3081\u308b\u90e8\u5206\u306a\u306e\u3067\u3059\u304c\u3001\u30ed\u30fc\u30ab\u30eb\u74b0\u5883\u3067\u306f\u691c\u8a3c\u3057\u3066\u3082\u3046\u307e\u304f\u3044\u304b\u306a\u3044\uff08\u3053\u3068\u306e\u307b\u3046\u304c\u591a\u3044\uff09\u3068\u601d\u3044\u307e\u3059\u306e\u3067\u3001\u4ee5\u4e0b\u306e\u6761\u4ef6\u3067\u5207\u308a\u66ff\u3048\u3066\u3044\u307e\u3059\u3002<\/p>\n<ul>\n<li>\u30ed\u30fc\u30ab\u30eb\uff1a \u30b5\u30fc\u30d0\u30fc\u8a3c\u660e\u66f8\u306e\u691c\u8a3c\u306f\u3057\u306a\u3044<\/li>\n<li>\u672c\u756a\uff1a \u691c\u8a3c\u3059\u308b<\/li>\n<\/ul>\n<p>\u3010\u8ffd\u8a18\uff1a2025.02.15\u3011<br \/>\n\u3069\u3046\u3084\u3089\u3001\u30d1\u30fc\u30de\u30ea\u30f3\u30af\u8a2d\u5b9a\u306e\u5f71\u97ff\u3067\u4e0a\u8a18\u306e\u30b3\u30fc\u30c9\u3060\u3068\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3057\u3066\u3057\u307e\u3046\u5834\u5408\u304c\u3042\u308b\u3088\u3046\u3067\u3059\u3002\u305d\u306e\u5834\u5408\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5909\u66f4\u3057\u3066\u8a66\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\uff01<\/p>\n<div>\n<pre>\/\/ 1\uff1aURL\u3092\u30c8\u30c3\u30d7\u3078\u5909\u66f4\n$url = 'https:\/\/cms.wp59.test\/wp-json\/wp\/v2\/posts';\n\u2193\u2193\u2193\n$url = 'https:\/\/cms.wp59.test\/';<\/pre>\n<div>\n<pre>\/\/ 2\uff1a\u30d1\u30e9\u30e1\u30fc\u30bf\u306brest_route\u3092\u8ffd\u52a0\n-&gt;get($url, [\n    <strong>'rest_route' =&gt; '\/wp\/v2\/posts', \/\/ \u2190\u3053\u3053\u3092\u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u8ffd\u52a0<\/strong>\n    '_fields' =&gt; 'id,title,content',\n    'categories' =&gt; implode(',', $category_ids),\n    'page' =&gt; $page,\n    'per_page' =&gt; $per_page,\n    'orderby' =&gt; 'date',\n    'order' =&gt; 'desc',\n]);<\/pre>\n<\/div>\n<\/div>\n<h2>\u30eb\u30fc\u30c8\u3092\u3064\u304f\u308b<\/h2>\n<p>\u6b21\u306b\u3001\u30eb\u30fc\u30c8\u3067\u3059\u3002<br \/>\n\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5909\u66f4\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><strong>routes\/web.php<\/strong><\/p>\n<pre>\/\/ \u7701\u7565<strong>\n\nuse App\\Http\\Controllers\\HeadlessCmsController;<\/strong>\n\n\/\/ \u7701\u7565\n\n<strong>Route::controller(HeadlessCmsController::class)-&gt;group(function(){<\/strong>\n\n<strong>    Route::get('headless_cms', 'index')-&gt;name('headless_cms.index');<\/strong>\n\n<strong>});<\/strong><\/pre>\n<h1>Rest API \u304b\u3089\u53d6\u5f97\u3057\u305f\u30c7\u30fc\u30bf\u3092\u8868\u793a\u3059\u308b<\/h1>\n<p>\u3067\u306f\u3001\u6700\u5f8c\u306b<code>Rest API<\/code>\u304b\u3089\u53d6\u5f97\u3057\u305f\u30c7\u30fc\u30bf\u3092<code>Vue<\/code>\u3067\u8868\u793a\u3059\u308b\u90e8\u5206\u3067\u3059\u3002<\/p>\n<p><strong>resources\/views\/announcement.blade.php<\/strong><\/p>\n<pre><strong>&lt;html&gt;<\/strong>\n<strong>&lt;head&gt;<\/strong>\n<strong>    &lt;link href=\"https:\/\/cdn.jsdelivr.net\/npm\/bootstrap@5.0.1\/dist\/css\/bootstrap.min.css\" rel=\"stylesheet\"&gt;<\/strong>\n<strong>&lt;\/head&gt;<\/strong>\n<strong>&lt;body&gt;<\/strong>\n<strong>&lt;div id=\"app\" class=\"p-5 w-50\"&gt;<\/strong>\n<strong>    &lt;div v-if=\"isStatusIndex\"&gt;<\/strong>\n<strong>        &lt;ul v-for=\"announcement in announcements\"&gt;<\/strong>\n<strong>            &lt;li&gt;<\/strong>\n<strong>                &lt;a href=\"#\" v-text=\"announcement.title.rendered\" @click.prevent=\"showDetail(announcement.id)\"&gt;&lt;\/a&gt;<\/strong>\n<strong>            &lt;\/li&gt;<\/strong>\n<strong>        &lt;\/ul&gt;<\/strong>\n<strong>        &lt;nav aria-label=\"Page navigation\"&gt;<\/strong>\n<strong>            &lt;ul class=\"pagination\"&gt;<\/strong>\n<strong>                &lt;li class=\"page-item\" :class=\"{ disabled: !hasPrevPage }\" @click.prevent=\"movePage('prev')\"&gt;&lt;a class=\"page-link\" href=\"#\"&gt;\u524d\u3078&lt;\/a&gt;&lt;\/li&gt;<\/strong>\n<strong>                &lt;li class=\"page-item\" :class=\"{ disabled: !hasNextPage }\" @click.prevent=\"movePage('next')\"&gt;&lt;a class=\"page-link\" href=\"#\"&gt;\u6b21\u3078&lt;\/a&gt;&lt;\/li&gt;<\/strong>\n<strong>            &lt;\/ul&gt;<\/strong>\n<strong>        &lt;\/nav&gt;<\/strong>\n<strong>    &lt;\/div&gt;<\/strong>\n<strong>    &lt;div v-if=\"isStatusShow\"&gt;<\/strong>\n<strong>        &lt;div class=\"card mb-3\"&gt;<\/strong>\n<strong>            &lt;div class=\"card-header\" v-text=\"currentAnnouncement.title.rendered\"&gt;&lt;\/div&gt;<\/strong>\n<strong>            &lt;div class=\"card-body\" v-html=\"currentAnnouncement.content.rendered\"&gt;&lt;\/div&gt;<\/strong>\n<strong>        &lt;\/div&gt;<\/strong>\n<strong>        &lt;button class=\"btn btn-secondary\" @click=\"setStatus('index')\"&gt;\u623b\u308b&lt;\/button&gt;<\/strong>\n<strong>    &lt;\/div&gt;<\/strong>\n<strong>&lt;\/div&gt;<\/strong>\n<strong>&lt;script src=\"https:\/\/unpkg.com\/vue@3.2.31\/dist\/vue.global.prod.js\"&gt;&lt;\/script&gt;<\/strong>\n<strong>&lt;script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/axios\/0.26.1\/axios.min.js\"&gt;&lt;\/script&gt;<\/strong>\n<strong>&lt;script&gt;<\/strong>\n\n<strong>    const { createApp, ref, computed, onMounted } = Vue;<\/strong>\n\n<strong>    createApp({<\/strong>\n<strong>        setup() {<\/strong>\n\n<strong>            \/\/ \u8868\u793a\u30b9\u30c6\u30fc\u30bf\u30b9<\/strong>\n<strong>            let status = ref('index');<\/strong>\n<strong>            const isStatusIndex = computed(() =&gt; status.value === 'index');<\/strong>\n<strong>            const isStatusShow = computed(() =&gt; status.value === 'show');<\/strong>\n<strong>            const setStatus = newStatus =&gt; {<\/strong>\n\n<strong>                status.value = newStatus;<\/strong>\n\n<strong>            };<\/strong>\n\n<strong>            \/\/ \u304a\u77e5\u3089\u305b\u4e00\u89a7<\/strong>\n<strong>            let announcements = ref([]);<\/strong>\n<strong>            let pagination = ref({});<\/strong>\n<strong>            let page = ref(1);<\/strong>\n<strong>            const perPage = 2;<\/strong>\n<strong>            const getPosts = () =&gt; {<\/strong>\n\n<strong>                const url = '{{ route('headless_cms.index') }}';<\/strong>\n<strong>                const params = {<\/strong>\n<strong>                    params: {<\/strong>\n<strong>                        page: page.value,<\/strong>\n<strong>                        per_page: perPage<\/strong>\n<strong>                    }<\/strong>\n<strong>                }<\/strong>\n\n<strong>                axios.get(url, params)<\/strong>\n<strong>                    .then(response =&gt; {<\/strong>\n\n<strong>                        const responseData = response.data;<\/strong>\n<strong>                        announcements.value = responseData.data;<\/strong>\n<strong>                        pagination.value = responseData.pagination;<\/strong>\n\n<strong>                    });<\/strong>\n\n<strong>            };<\/strong>\n<strong>            const movePage = direction =&gt; {<\/strong>\n\n<strong>                if (direction === 'prev' &amp;&amp; hasPrevPage.value) {<\/strong>\n\n<strong>                    page.value--;<\/strong>\n\n<strong>                } else if (direction === 'next' &amp;&amp; hasNextPage.value) {<\/strong>\n\n<strong>                    page.value++;<\/strong>\n\n<strong>                }<\/strong>\n\n<strong>                getPosts();<\/strong>\n\n<strong>            };<\/strong>\n<strong>            const hasPrevPage = computed(() =&gt; {<\/strong>\n\n<strong>                return page.value &gt; 1;<\/strong>\n\n<strong>            });<\/strong>\n<strong>            const hasNextPage = computed(() =&gt; {<\/strong>\n\n<strong>                return pagination.value.total_pages &gt; page.value;<\/strong>\n\n<strong>            });<\/strong>\n<strong>            onMounted(() =&gt; {<\/strong>\n\n<strong>                getPosts();<\/strong>\n\n<strong>            });<\/strong>\n\n<strong>            \/\/ \u304a\u77e5\u3089\u305b\u8a73\u7d30<\/strong>\n<strong>            let currentAnnouncementId = ref(-1);<\/strong>\n<strong>            const currentAnnouncement = computed(() =&gt; {<\/strong>\n\n<strong>                return announcements.value.find(announcement =&gt; {<\/strong>\n\n<strong>                    return Number(announcement.id) === Number(currentAnnouncementId.value)<\/strong>\n\n<strong>                });<\/strong>\n\n<strong>            });<\/strong>\n<strong>            const showDetail = (announcementId) =&gt; {<\/strong>\n\n<strong>                currentAnnouncementId.value = announcementId;<\/strong>\n<strong>                status.value = 'show';<\/strong>\n\n<strong>            };<\/strong>\n\n<strong>            return {<\/strong>\n<strong>                isStatusIndex,<\/strong>\n<strong>                isStatusShow,<\/strong>\n<strong>                setStatus,<\/strong>\n<strong>                announcements,<\/strong>\n<strong>                movePage,<\/strong>\n<strong>                hasPrevPage,<\/strong>\n<strong>                hasNextPage,<\/strong>\n<strong>                currentAnnouncement,<\/strong>\n<strong>                showDetail<\/strong>\n<strong>            }<\/strong>\n\n<strong>        }<\/strong>\n<strong>    })<\/strong>\n<strong>    .mount('#app');<\/strong>\n\n<strong>&lt;\/script&gt;<\/strong>\n<strong>&lt;\/body&gt;<\/strong>\n<strong>&lt;\/html&gt;<\/strong><\/pre>\n<p>\u4eca\u56de\u3082<code>Composition API<\/code>\u5f62\u5f0f\u3067\u30b3\u30fc\u30c9\u3092\u66f8\u3044\u3066\u3044\u307e\u3059\uff08<code>.value<\/code>\u304c\u90aa\u9b54\u304f\u3055\u3044\u304b\u3082\u3067\u3059\u306d\u2026\ud83d\ude02\uff09<\/p>\n<h1>\u3061\u306a\u307f\u306b\uff1a\u30ab\u30c6\u30b4\u30ea\u5206\u3051\u3057\u3066\u8907\u6570\u30b5\u30a4\u30c8\u5bfe\u5fdc\u3059\u308b<\/h1>\n<p>\u5f53\u521d\u306f\u8907\u6570\u30b5\u30a4\u30c8\u5bfe\u5fdc\u3092\u8003\u3048\u3066\u3044\u305f\u306e\u3067\u3059\u304c\u3001\u305d\u3046\u306a\u308b\u3068\u8a18\u4e8b\u3068\u3057\u3066\u8907\u96d1\u306b\u306a\u308a\u3059\u304e\u3066\u3057\u307e\u3046\u3068\u601d\u3063\u305f\u306e\u3067\u3001\u3053\u3053\u3067\u300c\u304a\u307e\u3051\u7684\u300d\u306a\u30ab\u30f3\u30b8\u3067\u3054\u7d39\u4ecb\u3059\u308b\u3053\u3068\u306b\u3057\u307e\u3059\u3002<\/p>\n<p>\u306a\u304a\u3001\u3053\u306e\u5f62\u306b\u3057\u3066\u304a\u304f\u3068\u300c<strong>WordPress \u3072\u3068\u3064\u3042\u308c\u3070\u3001\u3044\u304f\u3064\u3067\u3082\u30b5\u30a4\u30c8\u306e\u306e\u304a\u77e5\u3089\u305b\u7ba1\u7406\u304c\u3067\u304d\u308b<\/strong>\u300d\u306e\u3067\u3068\u3066\u3082\u4fbf\u5229\u3060\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u3067\u306f\u3001\u307e\u305a\u30ab\u30c6\u30b4\u30ea\u3092\u3064\u304f\u308a\u307e\u3059\u3002<\/p>\n<p>\u4f8b\u3048\u3070\u3001\u300c<strong>\u30ab\u30ec\u30fc\u5927\u597d\u304d\uff01<\/strong>\u300d\u3068\u3044\u3046\u30b5\u30a4\u30c8\u304c\u3042\u3063\u305f\u3068\u3057\u305f\u3089\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u300c<strong>\u30ab\u30ec\u30fc\u5927\u597d\u304d\uff01\u306e\u304a\u77e5\u3089\u305b<\/strong>\u300d\u3068\u3044\u3046\u30ab\u30c6\u30b4\u30ea\u3092\u3064\u304f\u308a\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10279\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/03\/wordpress_as_headless_cms_8.png\" alt=\"\" width=\"529\" height=\"115\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/03\/wordpress_as_headless_cms_8.png 529w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/03\/wordpress_as_headless_cms_8-300x65.png 300w\" sizes=\"auto, (max-width: 529px) 100vw, 529px\" \/><\/p>\n<p>\u30ab\u30c6\u30b4\u30ea\u3092\u4f5c\u6210\u3057\u305f\u3089\u3001<code>\u30ab\u30c6\u30b4\u30ea ID<\/code>\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002<br \/>\n<code>ID<\/code>\u306f\u7de8\u96c6\u30da\u30fc\u30b8\u306e<code>URL<\/code>\u306b\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10278\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/03\/wordpress_as_headless_cms_10.png\" alt=\"\" width=\"640\" height=\"187\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/03\/wordpress_as_headless_cms_10.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/03\/wordpress_as_headless_cms_10-300x88.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u203b <code>Rest API<\/code>\u3092\u4f7f\u3048\u3070<code>slug<\/code>\u3067\u6307\u5b9a\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u304c\u3001\u3053\u308c\u307e\u305f\u8907\u96d1\u306b\u306a\u3063\u3066\u3057\u307e\u3046\u306e\u3067\u3001ID\u53d6\u5f97\u3059\u308b\u5f62\u3067\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<p>\u5f8c\u306f\u3001<code>Rest API<\/code>\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u90e8\u5206\u306b\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u8ffd\u52a0\u3057\u3066\u3042\u3052\u308b\u3060\u3051\u3067OK\u3067\u3059\u3002<\/p>\n<p><strong>app\/Http\/Controllers\/HeadlessCmsController.php<\/strong><\/p>\n<pre>\/\/ \u7701\u7565\n\n$response = Http::withHeaders(['Authorization' =&gt; $authorization])\n    -&gt;withOptions(['verify' =&gt; $should_verify])\n    -&gt;get($url, [\n        '_fields' =&gt; 'id,title,content',\n        'page' =&gt; $page,\n        'per_page' =&gt; $per_page,\n        'orderby' =&gt; 'date',\n        'order' =&gt; 'desc',\n        <strong>'categories' =&gt; '3,4'<\/strong> \/\/ \ud83d\udc48 \u3053\u3053\uff08\u8907\u6570\u306e\u5834\u5408\u306f\u30ab\u30f3\u30de\u533a\u5207\u308a\uff09\n    ]);<\/pre>\n<p>\u540c\u69d8\u306b\u4ed6\u306e\u30b5\u30a4\u30c8\u306b\u3082\u30ab\u30c6\u30b4\u30ea\u3092\u3064\u304f\u3063\u3066<code>ID<\/code>\u3092\u30bb\u30c3\u30c8\u3059\u308c\u3070\u8907\u6570\u30b5\u30a4\u30c8\u3078\u5bfe\u5fdc\u304c\u3067\u304d\u307e\u3059\u3088\ud83d\udc4d<\/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\u306f\u3044\u304f\u3064\u304b\u30c6\u30b9\u30c8\u306e\u304a\u77e5\u3089\u305b\u3092\u6295\u7a3f\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10282\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/03\/wordpress_as_headless_cms_12.png\" alt=\"\" width=\"289\" height=\"317\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/03\/wordpress_as_headless_cms_12.png 289w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/03\/wordpress_as_headless_cms_12-274x300.png 274w\" sizes=\"auto, (max-width: 289px) 100vw, 289px\" \/><\/p>\n<p>\u7d9a\u3044\u3066\u3001<code>Laravel<\/code>\u5074\u306e<code>URL<\/code>\u300c<strong>https:\/\/******\/announcement<\/strong>\u300d\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u3059\u308b\u3068\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10281\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/03\/wordpress_as_headless_cms_11.png\" alt=\"\" width=\"253\" height=\"165\" \/><\/p>\n<p>\u306f\u3044\u2757<br \/>\n\u4eca\u56de\u306f\u30da\u30fc\u30b8\u6570\u3092\uff12\u4ef6\u306b\u3057\u3066\u3044\u308b\u306e\u3067\u3061\u3087\u3063\u3068\u5c11\u306a\u3044\u3067\u3059\u304c\u3001\u30da\u30fc\u30b8\u79fb\u52d5\u30ea\u30f3\u30af\u3082\u8868\u793a\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3067\u306f\u3001\u4e00\u756a\u4e0a\u306e\u30ea\u30f3\u30af\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u3069\u3046\u306a\u308b\u3067\u3057\u3087\u3046\u304b\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb\uff1f\uff1f<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10283\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/03\/wordpress_as_headless_cms_13.png\" alt=\"\" width=\"566\" height=\"206\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/03\/wordpress_as_headless_cms_13.png 566w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/03\/wordpress_as_headless_cms_13-300x109.png 300w\" sizes=\"auto, (max-width: 566px) 100vw, 566px\" \/><\/p>\n<p>\u306f\u3044\u2757<br \/>\n\u3046\u307e\u304f\u4e2d\u8eab\u304c\u8868\u793a\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<p>\u3067\u306f\u3001\u300c<strong>\u623b\u308b<\/strong>\u300d\u30dc\u30bf\u30f3\u3067\u623b\u3063\u3066\u300c<strong>\u6b21\u3078<\/strong>\u300d\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10284\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/03\/wordpress_as_headless_cms_14.png\" alt=\"\" width=\"243\" height=\"162\" \/><\/p>\n<p>\u306f\u3044\u2757<br \/>\n\u30ea\u30f3\u30af\u306e\u5185\u5bb9\u304c\u5909\u308f\u308a\u3001\u3055\u3089\u306b\u300c<strong>\u524d\u3078<\/strong>\u300d\u30ea\u30f3\u30af\u3082\u6709\u52b9\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u6210\u529f\u3067\u3059\ud83d\ude04\u2728<\/p>\n<p>\u3067\u306f\u3001\u304a\u305d\u3089\u304f\u753b\u50cf\u3084<code>YouTube<\/code>\u52d5\u753b\u3092\u4f7f\u3044\u305f\u3044\u5834\u5408\u3082\u3042\u308b\u3068\u601d\u3046\u306e\u3067\u3001\u3046\u307e\u304f\u8868\u793a\u3067\u304d\u308b\u304b\u3092\u30c1\u30a7\u30c3\u30af\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<p>\u3046\u307e\u304f\u3044\u304f\u3067\u3057\u3087\u3046\u304b\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb\uff1f\uff1f<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10285\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/03\/wordpress_as_headless_cms_15.png\" alt=\"\" width=\"553\" height=\"594\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/03\/wordpress_as_headless_cms_15.png 553w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/03\/wordpress_as_headless_cms_15-279x300.png 279w\" sizes=\"auto, (max-width: 553px) 100vw, 553px\" \/><\/p>\n<p>\u306f\u3044\u2757<br \/>\n\u753b\u50cf\u3082\u52d5\u753b\u3082\u3046\u307e\u304f\u8868\u793a\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<p>\u3059\u3079\u3066\u6210\u529f\u3067\u3059\u2728\ud83d\ude04\ud83d\udc4d<\/p>\n<h1>\u5b9f\u969b\u306e\u4f7f\u7528\u4f8b<\/h1>\n<p>\u79c1\u304c\u500b\u4eba\u7684\u306b\u904b\u55b6\u3057\u3066\u3044\u308b\u300c<a href=\"https:\/\/machi-collection.com\/\" target=\"_blank\" rel=\"noopener\">\u8857\u89d2\u30b3\u30ec\u30af\u30b7\u30e7\u30f3<\/a>\u300d\u306e\u300c\u304a\u77e5\u3089\u305b\u300d\u306f\u4eca\u56de\u306e\u6280\u8853\u3067\u4f5c\u6210\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u8208\u5473\u306e\u3042\u308b\u65b9\u306f\u305c\u3072\u3054\u89a7\u304f\u3060\u3055\u3044\u2757<\/p>\n<p><a href=\"https:\/\/machi-collection.com\/announcement\" target=\"_blank\" rel=\"noopener\">\u8857\u89d2\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\uff1a\u304a\u77e5\u3089\u305b<\/a><\/p>\n<h1>\u4f01\u696d\u69d8\u3078\u306e\u3054\u63d0\u6848<\/h1>\n<p>\u3082\u3061\u308d\u3093\u3001\u5b9f\u969b\u306b\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u3067\u516c\u958b\u3055\u308c\u3066\u3044\u308b\u30b5\u30fc\u30d3\u30b9\u3068\u6bd4\u3079\u308b\u3068\u3067\u304d\u308b\u3053\u3068\u306f\u5c11\u306a\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304c\u3001\u30b7\u30f3\u30d7\u30eb\u306b\u300c\u30bf\u30a4\u30c8\u30eb\u300d\u3068\u300c\u672c\u6587\u300d\u3060\u3051\u3067OK\u306a\u5834\u5408\u306f\u3001\u5341\u5206\u5bfe\u5fdc\u3067\u304d\u308b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001\u300c\u30d8\u30c3\u30c9\u30ec\u30b9 CMS\u300d\u30b5\u30fc\u30d3\u30b9\u306b\u5fc5\u8981\u306a<strong>\u56fa\u5b9a\u8cbb\u3092\u306a\u304f\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059<\/strong>\u3057\u3001\u3059\u3067\u306b<strong>\u3054\u5229\u7528\u4e2d\u306e\u30b5\u30fc\u30d0\u30fc\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/strong><\/p>\n<p>\u305d\u3057\u3066\u3001\u8907\u6570\u30b5\u30a4\u30c8\u3078\u5bfe\u5fdc\u3067\u304d\u307e\u3059\u3057\u3001\u306a\u306b\u3088\u308a<code>WordPress<\/code>\u304c\u4f7f\u3044\u6163\u308c\u3066\u3044\u308b\u5834\u5408\u3001<strong>\u65b0\u3057\u3044\u52c9\u5f37\u3092\u305b\u305a\u306b\u4f7f\u3044\u306f\u3058\u3081\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/strong><\/p>\n<p>\u305c\u3072\u4eca\u56de\u306e\u6a5f\u80fd\u3092\u3054\u5e0c\u671b\u3067\u3057\u305f\u3089\u3001\u304a\u554f\u3044\u5408\u308f\u305b\u304b\u3089\u3054\u4f9d\u983c\u304f\u3060\u3055\u3044\u3002<br \/>\n\u304a\u5f85\u3061\u3057\u3066\u304a\u308a\u307e\u3059\u3002\ud83d\ude04\u2728<\/p>\n<h1>WordPress \u3092\u30d8\u30c3\u30c9\u30ec\u30b9 CMS \u5316\u3059\u308b\u30d7\u30e9\u30b0\u30a4\u30f3<\/h1>\n<p>\u305b\u3063\u304b\u304f\u306a\u306e\u3067\u3001\u4eca\u56de\u306e\u30b3\u30fc\u30c9\u3092\u5143\u306b\u3057\u3066\u30b7\u30f3\u30d7\u30eb\u306a\u30d7\u30e9\u30b0\u30a4\u30f3\u300c<strong>\u30d8\u30c3\u30c9\u30ec\u30b9 CMSize<\/strong>\u300d\u3092\u3064\u304f\u3063\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p>\u3053\u3093\u306a\u30ab\u30f3\u30b8\u3067\u3059\u3002<br \/>\n\u2193\u2193\u2193<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10310\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/04\/wordpress_as_headless_cms_16.png\" alt=\"\" width=\"640\" height=\"580\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/04\/wordpress_as_headless_cms_16.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/04\/wordpress_as_headless_cms_16-300x272.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u4ee5\u4e0b\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3067\u304d\u307e\u3059\u3002<\/p>\n<a  data-e-Disable-Page-Transition=\"true\" class=\"download-link\" title=\"\" href=\"https:\/\/blog.capilano-fw.com?download=10315&amp;tmstv=1777535761\" rel=\"nofollow\" id=\"download-link-10315\" data-redirect=\"false\" >\n\tWordPress \u3092\u30d8\u30c3\u30c9\u30ec\u30b9 CMS \u5316\u3059\u308b\u30d7\u30e9\u30b0\u30a4\u30f3<\/a>\n\n<h2>\u6982\u8981<\/h2>\n<ul>\n<li>\u7121\u6599\u3067\u4f7f\u3048\u307e\u3059\uff08\u3082\u3057\u826f\u304b\u3063\u305f\u3089\u4ee3\u308f\u308a\u306b <a href=\"https:\/\/twitter.com\/SukohiKuhoh\" target=\"_blank\" rel=\"noopener\">Twitter<\/a> \u30d5\u30a9\u30ed\u30fc\u304a\u9858\u3044\u3057\u307e\u3059\ud83d\udc4d\uff09<\/li>\n<li>WordPress 5.9\uff08PHP 7.4\uff09 \u3067\u958b\u767a\u3057\u307e\u3057\u305f<\/li>\n<li>\u30e9\u30a4\u30bb\u30f3\u30b9\u306f WordPress \u306b\u5408\u308f\u305b\u3066 GPLv2 (or later) \u3067\u3059<\/li>\n<\/ul>\n<h2>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u65b9\u6cd5<\/h2>\n<p>\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\uff06\u5c55\u958b\u3057\u3001<code>wp-content\/plugins\/<\/code>\u306b\u30bb\u30c3\u30c8\u3057\uff08\u203b\uff09\u3001\u30d7\u30e9\u30b0\u30a4\u30f3\u30da\u30fc\u30b8\u304b\u3089\u300c<strong>\u30d8\u30c3\u30c9\u30ec\u30b9 CMSize<\/strong>\u300d\u3092\u6709\u52b9\u306b\u3059\u308b\u3060\u3051\u3067\u3059\u3002<\/p>\n<p>\u203b <code>wp-content\/plugins\/headless-cmsize\/headless-cmsize.php<\/code>\u304c\u5b58\u5728\u3059\u308b\u3088\u3046\u306b\u8a2d\u7f6e\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h1>\u304a\u308f\u308a\u306b<\/h1>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u4eca\u56de\u306f\u300c<strong>Laravel + WordPress<\/strong>\u300d\u3067\u300c<strong>\u30d8\u30c3\u30c9\u30ec\u30b9CMS<\/strong>\u300d\u3092\u3064\u304f\u3063\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p>\u5b9f\u88c5\u3059\u308b\u306b\u306f\u3001\u300c<strong>WordPress<\/strong>\u300d\u300c<strong>Laravel<\/strong>\u300d\u300c<strong>Vue<\/strong>\u300d\u306e\u77e5\u8b58\u304c\u5fc5\u8981\u306b\u306a\u308b\u306e\u3067\u3001\u5c11\u3057\u5b66\u7fd2\u3059\u308b\u30a8\u30ea\u30a2\u306f\u5e83\u3044\u3067\u3059\u304c\u3001\u305d\u308c\u307b\u3069\u96e3\u3057\u3044\u5185\u5bb9\u3067\u306f\u306a\u3044\u3068\u601d\u3044\u307e\u3059\u306e\u3067\u3001\u305c\u3072\u8a66\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u306d\u3002<\/p>\n<p>\u3067\u306f\u3067\u306f\u301c\u2757<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-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\" \/>\u300c\u307e\u305f\u5f53\u521d\u306e\u30dc\u30ea\u30e5\u30fc\u30e0\u3092<br \/>\n\u5927\u304d\u304f\u8d85\u3048\u3066\u3057\u307e\u3044\u307e\u3057\u305f<br \/>\n\u30b0\u30c3\u30bf\u30ea\u2026\uff08\u7b11\uff09\u300d<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u6700\u8fd1\u7279\u306bTwitter\u304b\u3089\u60c5\u5831\u3092\u5f97\u3066\u3044\u308b\u3068\u6700\u65b0\u60c5\u5831\u304c\u8c4a\u5bcc\u306a\u306e\u3067\u300c\u6642\u4ee3\u306b\u53d6\u308a\u6b8b\u3055\u308c\u306b\u304f\u304f\u306a\u308b\u300d\u3088\u3046\u306a\u6c17\u304c\u3057\u3066\u3044\u307e\u3059\u3002 \u3057\u304b\u3082\u3001\u512a\u79c0\u306a\u65b9\u3005\u306e\u30c4\u30a4\u30fc\u30c8\u306f\u304a\u91d1 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.capilano-fw.com\/?p=10262\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;WordPress + Laravel \u3067\u300c\u30d8\u30c3\u30c9\u30ec\u30b9 CMS\u300d\u3092\u3064\u304f\u308b&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":10290,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,12,59],"tags":[],"class_list":["post-10262","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-laravel","category-vue-js","category-wordpress"],"_links":{"self":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/10262","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=10262"}],"version-history":[{"count":26,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/10262\/revisions"}],"predecessor-version":[{"id":14936,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/10262\/revisions\/14936"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/media\/10290"}],"wp:attachment":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10262"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10262"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10262"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}