{"id":10005,"date":"2019-04-30T16:00:29","date_gmt":"2019-04-30T07:00:29","guid":{"rendered":"http:\/\/www.moonmile.net\/blog\/?p=10005"},"modified":"2019-04-30T17:34:17","modified_gmt":"2019-04-30T08:34:17","slug":"laravel-%e3%81%a7-wordpress-%e3%82%92%e8%aa%ad%e3%81%bf%e8%be%bc%e3%82%80%ef%bc%88%e8%87%aa%e5%89%8dmvc%ef%bc%89","status":"publish","type":"post","link":"http:\/\/www.moonmile.net\/blog\/archives\/10005","title":{"rendered":"Laravel \u3067 wordpress \u3092\u8aad\u307f\u8fbc\u3080\uff08\u81ea\u524dMVC\uff09"},"content":{"rendered":"<p>\u3072\u3068\u307e\u305a\u3001Laravel \u306b\u6163\u308c\u308b\u305f\u3081\u306b MVC \u30d1\u30bf\u30fc\u30f3\u3092\u76f4\u63a5\u6271\u3063\u3066\u307f\u308b\u3002\u5148\u306b InfyOm \u3092\u4f7f\u3063\u3066\u81ea\u52d5\u4f5c\u6210\u3057\u3066\u307f\u305f\u306e\u3060\u304c\u3001\u30a8\u30e9\u30fc\u304c\u983b\u767a\u3057\u3066\u3088\u304f\u308f\u304b\u3089\u3093\u3002\u306e\u3067\u3001\u305d\u3046\u3044\u3046\u3068\u304d\u306f\u624b\u4f5c\u696d\u3067\u3084\u3063\u3066\u307f\u308b\u306b\u9650\u308b\u3002<\/p>\n<p>\u76ee\u7684\u3068\u3057\u3066\u306f\u3001<\/p>\n<ul>\n<li>wordpress \u306e\u3088\u3046\u306a\u65e2\u5b58\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u8aad\u307f\u8fbc\u3080<\/li>\n<li>\u30de\u30b9\u30bf\u30fc\u7ba1\u7406\u306e\u3088\u3046\u306a CRUD \u30d9\u30fc\u30b9\u306e\u30da\u30fc\u30b8\u3092\u81ea\u52d5\u4f5c\u6210\u3059\u308b<\/li>\n<li>\u5834\u5408\u306b\u3088\u3063\u3066\u306f\u3001CRUD \u306a Web API \u3082\u81ea\u52d5\u751f\u6210\u3059\u308b\u3002<\/li>\n<li>\u5834\u5408\u306b\u3088\u3063\u3066\u306f\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u304b\u3089\u547c\u3073\u51fa\u3059\u30b3\u30fc\u30c9(C#, nodejs\u3068\u304b)\u3082\u751f\u6210\u3057\u3066\u3057\u307e\u3046\u3002<\/li>\n<\/ul>\n<p>\u307e\u305a\u306f\u3001xampp \u3067 wordpress \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3001mysql \u90e8\u5206\u3060\u3051\u30a2\u30af\u30bb\u30b9\u53ef\u80fd\u306b\u3057\u3066\u304a\u304f\u3002<\/p>\n<h2 id=\"composer-%E3%81%A7%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%EF%BC%86%E5%8B%95%E4%BD%9C%E7%A2%BA%E8%AA%8D\">composer \u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\uff06\u52d5\u4f5c\u78ba\u8a8d<\/h2>\n<p>\u9069\u5f53\u306a\u30d5\u30a9\u30eb\u30c0\u30fc\u3092\u4f5c\u6210\u3057\u3066\u3001Laravel \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/p>\n<pre class=\"hljs\"><code>\n<div>composer create-project --prefer-dist laravel\/laravel blog\n<\/div>\n<\/code><\/pre>\n<h2 id=\"%E3%83%87%E3%83%BC%E3%82%BF%E3%83%99%E3%83%BC%E3%82%B9%E3%81%AE%E8%A8%AD%E5%AE%9A\">\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u8a2d\u5b9a<\/h2>\n<p>\/.env \u3092\u4fee\u6b63\u3002wordpress \u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u8aad\u307f\u8fbc\u307e\u305b\u308b\u3002<\/p>\n<pre class=\"hljs\"><code>\n<div>DB_CONNECTION=mysql\nDB_HOST=127.0.0.1\nDB_PORT=3306\nDB_DATABASE=wordpress\nDB_USERNAME=wordpress\nDB_PASSWORD=wordpress\n<\/div>\n<\/code><\/pre>\n<h2 id=\"%E3%83%AA%E3%82%B9%E3%83%88%E8%A1%A8%E7%A4%BA%E3%82%92%E4%BD%9C%E6%88%90\">\u30ea\u30b9\u30c8\u8868\u793a\u3092\u4f5c\u6210<\/h2>\n<p>\u3044\u308f\u3086\u308b\u30c8\u30c3\u30d7\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u3001\u4e00\u89a7\u3092\u8868\u793a\u3055\u305b\u308b\u3002http:\/\/localhost:8000\/WpPost\/ \u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3002wordpress \u306e\u8a18\u4e8b\u306f wp_posts \u306b\u3042\u308b\u306e\u3060\u304c\u3001\u3053\u308c\u3092 Model \u30af\u30e9\u30b9\u3067\u306f WpPost \u3068\u3057\u3066\u4f7f\u3046\u3002<\/p>\n<h3 id=\"model-%E3%81%AE%E4%BD%9C%E6%88%90\">Model \u306e\u4f5c\u6210<\/h3>\n<p>Model \u30af\u30e9\u30b9\u3092\u4f5c\u308b\u3002\u5bfe\u8c61\u306e\u30c6\u30fc\u30d6\u30eb\u540d\u3092\u8a18\u8ff0\u3057\u3066\u3044\u306a\u3044\u304c\u3001\u3053\u306e\u624b\u306e MVC \u30d1\u30bf\u30fc\u30f3\u306e\u547d\u540d\u898f\u7d04\u306b<\/p>\n<ul>\n<li>\u30c6\u30fc\u30d6\u30eb\u540d\u306f\u8907\u6570\u5f62\u3001\u30e2\u30c7\u30eb\u30af\u30e9\u30b9\u306f\u5358\u6570\u5f62<\/li>\n<li>\u30e2\u30c7\u30eb\u30af\u30e9\u30b9\u306f\u3001\u30ad\u30e3\u30e1\u30eb\u30d1\u30bf\u30fc\u30f3\u304c\u591a\u3044<\/li>\n<li>\u30c6\u30fc\u30d6\u30eb\u540d\u306f\u30b9\u30cd\u30fc\u30af\u30d1\u30bf\u30fc\u30f3\u304c\u591a\u3044<\/li>\n<li>\u300c_\u300d\u304c\u5358\u8a9e\u306e\u533a\u5207\u308a\u306b\u306a\u308b\u3002<\/li>\n<\/ul>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u81ea\u52d5\u7684\u306b WpPost \u304b\u3089\u3000wp_posts \u3092\u63a8\u6e2c\u3055\u305b\u3066\u3044\u308b\u3002wordpress \u306e\u5834\u5408\u30d7\u30ec\u30d5\u30a3\u30c3\u30af\u30b9\u306f\u300cwp_\u300d\u3068\u306f\u9650\u3089\u306a\u3044\u306e\u3067\u3001\u3053\u306e\u3042\u305f\u308a\u306f\u660e\u793a\u7684\u306b\u30c6\u30fc\u30d6\u30eb\u540d\u3092\u6307\u5b9a\u3057\u305f\u307b\u3046\u304c\u3088\u3044\u304b\u3082\u3002<\/p>\n<pre class=\"hljs\"><code>\n<div>php artisan make:model Models\/WpPost\n<\/div>\n<\/code><\/pre>\n<p>\/app\/Models\/wp_posts.php \u304c\u751f\u6210\u3055\u308c\u308b<\/p>\n<pre class=\"hljs\"><code>\n<div>&lt;?php\n\nnamespace App\\Models;\n\nuse Illuminate\\Database\\Eloquent\\Model;\n\nclass WpPost extends Model\n{\n    \/\/\n}\n<\/div>\n<\/code><\/pre>\n<p>Model \u30af\u30e9\u30b9\u306e\u4e2d\u8eab\u304c\u7a7a\u3063\u307d\u3067\u4e0d\u5b89\u306b\u306a\u308b\u304c\u3001\u3053\u308c\u3067 ORM \u3055\u308c\u3066\u3044\u308b\u3002\u305f\u3060\u3057\u3001\u6761\u4ef6\u304c\u3042\u3063\u3066\u3001<\/p>\n<ul>\n<li>\u30d7\u30e9\u30a4\u30de\u30ea\u30fc\u30ad\u30fc\u306f\u300cid\u300d\u306e int \u578b\u3067\u3042\u308b\u3002<\/li>\n<li>\u4f5c\u6210\u65e5\u6642\u306b\u300ccreate_on\u300d\u3092\u4f7f\u3046\u3002<\/li>\n<li>\u66f4\u65b0\u65e5\u6642\u306b\u300cupdate_on\u300d\u3092\u4f7f\u3046\u3002<\/li>\n<\/ul>\n<p>\u304c\u5fc5\u8981\u306b\u306a\u308b\u3002\u3053\u308c\u3092\u6e80\u305f\u3059\u30c6\u30fc\u30d6\u30eb\u306e\u5834\u5408\u306f\u305d\u306e\u307e\u307e\u4f7f\u3048\u308b\u3057\u3001\u65b0\u898f\u306b\u30c6\u30fc\u30d6\u30eb\u3092\u4f5c\u308b\u3068\u304d\u306f\u3053\u306e\u898f\u7d04\u306b\u5408\u308f\u305b\u308b\u307b\u3046\u304c\u4fbf\u5229\uff08\u30c6\u30fc\u30d6\u30eb\u306e\u8907\u6570\u5f62\u3082\u3042\u308f\u305b\u3066\uff09\u3002<\/p>\n<p>\u305f\u3060\u3001\u4eca\u56de\u306f\u65e2\u5b58\u306e wordpress \u306e\u30c6\u30fc\u30d6\u30eb\u3092\u4f7f\u3046\u306e\u3067\u3001\u3053\u306e\u6761\u4ef6\u304c\u5c11\u3057\u9055\u3063\u3066\u3044\u308b\u3002\u3053\u308c\u306f\u5f8c\u3067\u4fee\u6b63\u3059\u308b\u3053\u3068\u306b\u306a\u308b\u3002<\/p>\n<h3 id=\"controller-%E3%81%AE%E4%BD%9C%E6%88%90\">Controller \u306e\u4f5c\u6210<\/h3>\n<p>\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u306f\u3001\u30e2\u30c7\u30eb\u540d + \u300cController\u300d\u3068\u306a\u308b\u3002<\/p>\n<pre class=\"hljs\"><code>\n<div>php artisan make:controller WpPostController\n<\/div>\n<\/code><\/pre>\n<p>\/app\/Http\/Controllers\/WpPostController.php \u304c\u751f\u6210\u3055\u308c\u308b<\/p>\n<pre class=\"hljs\"><code>\n<div>&lt;?php\n\nnamespace App\\Http\\Controllers;\n\nuse Illuminate\\Http\\Request;\n\nclass WpPostController extends Controller\n{\n    \/\/\n}\n<\/div>\n<\/code><\/pre>\n<p>\u3053\u308c\u3082\u4e2d\u8eab\u304c\u7a7a\u3063\u307d\u3067\u4e0d\u5b89\u306b\u306a\u308b\u306e\u3060\u304c\u3001\u3053\u3053\u306f\u624b\u4f5c\u696d\u3067\u4f5c\u308b\u3053\u3068\u306b\u306a\u308b\u3002\u5225\u9014\u3001\u81ea\u52d5\u751f\u6210\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u308b\u306e\u3060\u3051\u3069\u3001\u4eca\u56de\u306f\u624b\u52d5\u3067\u4f5c\u3063\u3066\u307f\u308b\u3002<\/p>\n<p>\u30ea\u30b9\u30c8\u8868\u793a\u3059\u308b index \u30a2\u30af\u30b7\u30e7\u30f3\u3060\u3051\u8ffd\u52a0\u3059\u308b\u3002<\/p>\n<pre class=\"hljs\"><code>\n<div>&lt;?php\n\nnamespace App\\Http\\Controllers;\n\nuse Illuminate\\Http\\Request;\nuse App\\Models\\WpPost;\n\nclass WpPostController extends Controller\n{\n    public function index()\n    {\n        $items = WpPost::all();\n        return view('WpPost.index', ['items' =&gt; $items]);\n    }\n}\n<\/div>\n<\/code><\/pre>\n<p>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304b\u3089\u5168\u4ef6\u62fe\u3063\u3066\u304f\u308b all() \u3092\u4f7f\u3046\u306e\u3068\u3001\u30d3\u30e5\u30fc\u306b\u6e21\u3059\u305f\u3081\u306b items \u3067\u53c2\u7167\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u3066\u304a\u304f\u3002<\/p>\n<ul>\n<li>ASP.NET \u306e EF \u306e\u3088\u3046\u306b\u3001ent.WpPost.ToList() \u306a\u611f\u3058\u3067\u53d6\u5f97<\/li>\n<li>ViewBag( &#8220;items&#8221; ) = items \u306e\u3088\u3046\u306a\u3082\u306e<\/li>\n<\/ul>\n<h3 id=\"view-%E3%82%92%E4%BD%9C%E6%88%90%E3%81%99%E3%82%8B\">View \u3092\u4f5c\u6210\u3059\u308b<\/h3>\n<p>\/resources\/views\/layouts\/app.blade.php \u3092\u4f5c\u6210\u3059\u308b\u3002\u3044\u308f\u3086\u308b<br \/>\n\u5168\u30da\u30fc\u30b8\u304b\u3089\u53c2\u7167\u3059\u308b\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3067\u3001@extends(&#8216;layouts.app&#8217;) \u3067\u53c2\u7167\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u3002<\/p>\n<pre class=\"hljs\"><code>\n<div>&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n&lt;head&gt;\n    &lt;title&gt;\n        @yield('title')\n    &lt;\/title&gt;\n&lt;\/head&gt;\n\n&lt;body&gt;\n&lt;h1&gt;@yield('title')&lt;\/h1&gt;\n&lt;div class=\"content-wrapper\"&gt;\n    @yield('content')\n&lt;\/div&gt;\n&lt;\/body&gt;\n&lt;\/html&gt;\n<\/div>\n<\/code><\/pre>\n<p>\u5404\u30da\u30fc\u30b8\u304b\u3089\u5165\u308c\u8fbc\u3080\u90e8\u5206\u306f\u300c@yield()\u300d\u3067\u66f8\u3044\u3066\u304a\u304f\u3002\u5404\u30da\u30fc\u30b8\u304b\u3089\u306f\u300c@section()\u300d\u3067\u53c2\u7167\u3059\u308b\u3002\u672c\u6765\u306f CSS \u3068\u304b JS \u3068\u304b\u306e\u8aad\u307f\u8fbc\u307f\u304c\u66f8\u3044\u3066\u308b\u306e\u3060\u304c\u3001\u4eca\u56de\u306f\u30b7\u30f3\u30d7\u30eb\u306b\u66f8\u3044\u3066\u304a\u304f\u3002<\/p>\n<p>\u4e00\u89a7\u8868\u3092\u8868\u793a\u3059\u308b\u30da\u30fc\u30b8\u306f\u3053\u3063\u3061\u3002\/resources\/views\/WpPost\/index.blade.php \u3092\u65b0\u898f\u4f5c\u6210\u3059\u308b\u3002<\/p>\n<pre class=\"hljs\"><code>\n<div>@extends('layouts.app')\n@section('title','WpPost.index')\n@section('content')\n    &lt;table&gt;\n        &lt;thead&gt;\n            &lt;td&gt;ID&lt;\/td&gt;\n            &lt;td&gt;post_title&lt;\/td&gt;\n            &lt;td&gt;post_date&lt;\/td&gt;\n        &lt;\/thead&gt;\n        &lt;tbody&gt;\n        @foreach( $items as $item )\n            &lt;tr&gt;\n                &lt;td&gt;{{ $item-&gt;ID }}&lt;\/td&gt;\n                &lt;td&gt;{{ $item-&gt;post_title }}&lt;\/td&gt;\n                &lt;td&gt;{{ $item-&gt;post_date }}&lt;\/td&gt;\n            &lt;\/tr&gt;\n        @endforeach\n        &lt;\/tbody&gt;\n    &lt;\/table&gt;\n@endsection\n<\/div>\n<\/code><\/pre>\n<p>\u30ec\u30a4\u30a2\u30a6\u30c8\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u300c@extends(&#8216;layouts.app&#8217;)\u300d\u3067\u53c2\u7167\u3057\u3066\u3044\u308b\u3002\u3042\u3068\u3001\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u304b\u3089\u6e21\u3055\u308c\u305f\u3001$items \u3092\u4f7f\u3063\u3066\u30ea\u30b9\u30c8\u8868\u793a\u3059\u308b\u3002<\/p>\n<h3 id=\"%E3%83%AB%E3%83%BC%E3%83%88%E6%83%85%E5%A0%B1%E3%82%92%E8%BF%BD%E5%8A%A0\">\u30eb\u30fc\u30c8\u60c5\u5831\u3092\u8ffd\u52a0<\/h3>\n<p>\/routes\/web.php \u306b\u8ffd\u52a0\u3059\u308b<\/p>\n<pre class=\"hljs\"><code>\n<div>Route::get('WpPost', 'WpPostController@index');\n<\/div>\n<\/code><\/pre>\n<p>\u30d6\u30e9\u30a6\u30b6\u304b\u3089\u547c\u3073\u51fa\u3059\u3068\u3001\u3069\u3053\u304c\u547c\u3073\u51fa\u3055\u308c\u308b\u304b\u3092\u8a18\u8ff0\u3059\u308b\u3002\u300chttp:\/\/localhost:8000\/WpPost\u300d\u3068\u3059\u308b\u3068\u3001WpPostController \u30af\u30e9\u30b9\u306e index \u30e1\u30bd\u30c3\u30c9\u304c\u547c\u3073\u51fa\u3055\u308c\u308b\u3002<\/p>\n<h3 id=\"%E3%83%96%E3%83%A9%E3%82%A6%E3%82%B6%E3%81%A7%E8%A1%A8%E7%A4%BA%E3%81%99%E3%82%8B\">\u30d6\u30e9\u30a6\u30b6\u3067\u8868\u793a\u3059\u308b.<\/h3>\n<p>\u7c21\u6613 HTTP \u30b5\u30fc\u30d0\u30fc\u3092\u52d5\u304b\u3057\u3066\u3001\u547c\u3073\u51fa\u3057\u3066\u307f\u308b\u3002<\/p>\n<pre class=\"hljs\"><code>\n<div>php artisan serve\n<\/div>\n<\/code><\/pre>\n<p><a href=\"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2019\/04\/images20190429_01org.jpg\"><img decoding=\"async\" src=\"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2019\/04\/images20190429_01thum.jpg\"><\/a><\/p>\n<h3 id=\"%E4%BD%9C%E6%88%90%E9%A0%86%E5%BA%8F\">\u4f5c\u6210\u9806\u5e8f<\/h3>\n<p>MVC \u30d1\u30bf\u30fc\u30f3\u3092\u4f7f\u3046\u3068\u3001\u66f8\u304d\u8fbc\u3080\u30b3\u30fc\u30c9\u3084\u8a2d\u5b9a\u304c\u3042\u3061\u3053\u3061\u6563\u308b\u306e\u304c\u5927\u5909\u306a\u306e\u3060\u3051\u3069\u3001\u624b\u9806\u3092\u4f5c\u3063\u3066\u304a\u304f\u3068\u4fbf\u5229\u3060\u3063\u305f\u308a\u3059\u308b\u3002<\/p>\n<ol>\n<li>\u30e2\u30c7\u30eb\u30af\u30e9\u30b9\u3092\u4f5c\u308b \/app\/Models\/wp_posts.php<\/li>\n<li>\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3092\u4f5c\u308b \/app\/Http\/Controllers\/WpPostController.php<\/li>\n<li>\u30a2\u30af\u30b7\u30e7\u30f3\u3092\u4f5c\u308b WpPostController::index<\/li>\n<li>\u30d3\u30e5\u30fc\u3092\u4f5c\u308b \/resources\/views\/WpPost\/index.blade.php<\/li>\n<li>\u30eb\u30fc\u30c8\u60c5\u5831\u3092\u4f5c\u308b \/routes\/web.php<\/li>\n<\/ol>\n<p><a href=\"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2019\/04\/images20190430_01org.jpg\"><img decoding=\"async\" src=\"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2019\/04\/images20190430_01thum.jpg\"><\/a><\/p>\n<p>Laravel \u306e\u5834\u5408\u306f\u3001Model -&gt; Controller -&gt; View -&gt; \u30eb\u30fc\u30c8\u60c5\u5831(web.php) \u306e\u9806\u3067\u4f5c\u3063\u3066\u3044\u304f\u3068\u308f\u304b\u308a\u3084\u3059\u3044\u3002<\/p>\n<h2 id=\"%E8%A9%B3%E7%B4%B0%E8%A1%A8%E7%A4%BA%E3%82%92%E4%BD%9C%E6%88%90\">\u8a73\u7d30\u8868\u793a\u3092\u4f5c\u6210<\/h2>\n<p>id \u3092\u6307\u5b9a\u3057\u3066\u8a73\u7d30\u8868\u793a\u3092\u3059\u308b\u30da\u30fc\u30b8\u3092\u4f5c\u308b\u3002http:\/\/localhost:8000\/WpPost\/1 \u306e\u3088\u3046\u306b ID \u3092\u6307\u5b9a\u3057\u3066\u30da\u30fc\u30b8\u3092\u958b\u304f\u3002<\/p>\n<h2 id=\"controller-%E3%81%AE%E4%BD%9C%E6%88%90\">Controller \u306e\u4f5c\u6210<\/h2>\n<p>\/app\/Http\/Controllers\/WpPostController.php \u3092\u7de8\u96c6<\/p>\n<pre class=\"hljs\"><code>\n<div>&lt;?php\nclass WpPostController extends Controller\n{\n    ...\n    public function show($id) {\n        $item = WpPost::find($id);\n        return view('WpPost.show', ['item' =&gt; $item]);\n    }\n}\n<\/div>\n<\/code><\/pre>\n<p>\u30d7\u30e9\u30a4\u30de\u30ea\u2015\u30ad\u30fc\u306e id \u3067\u306e\u691c\u7d22\u306f find() \u3092\u4f7f\u3046\u3002<\/p>\n<h3 id=\"view-%E3%82%92%E4%BD%9C%E6%88%90%E3%81%99%E3%82%8B\">View \u3092\u4f5c\u6210\u3059\u308b<\/h3>\n<p>\/resources\/views\/WpPost\/show.blade.php \u3092\u65b0\u898f\u4f5c\u6210\u3059\u308b\u3002<\/p>\n<pre class=\"hljs\"><code>\n<div>@extends('layouts.app')\n@section('title','WpPost.show')\n@section('content')\n    &lt;table&gt;\n        &lt;tr&gt;\n            &lt;td&gt;ID&lt;\/td&gt;\n            &lt;td&gt; {{ $item-&gt;ID }}&lt;\/td&gt;\n        &lt;\/tr&gt;\n        &lt;tr&gt;\n            &lt;td&gt;post_title&lt;\/td&gt;\n            &lt;td&gt; {{ $item-&gt;post_title }}&lt;\/td&gt;\n        &lt;\/tr&gt;\n        &lt;tr&gt;\n            &lt;td&gt;post_date&lt;\/td&gt;\n            &lt;td&gt; {{ $item-&gt;post_date }}&lt;\/td&gt;\n        &lt;\/tr&gt;\n    &lt;\/table&gt;\n@endsection\n<\/div>\n<\/code><\/pre>\n<h3 id=\"%E3%83%AB%E3%83%BC%E3%83%88%E6%83%85%E5%A0%B1%E3%82%92%E8%BF%BD%E5%8A%A0\">\u30eb\u30fc\u30c8\u60c5\u5831\u3092\u8ffd\u52a0<\/h3>\n<p>\/routes\/web.php \u306b\u8ffd\u52a0\u3059\u308b<\/p>\n<pre class=\"hljs\"><code>\n<div>Route::get('WpPost\/{id}', 'WpPostController@show');\n<\/div>\n<\/code><\/pre>\n<h3 id=\"%E3%83%96%E3%83%A9%E3%82%A6%E3%82%B6%E3%81%A7%E8%A1%A8%E7%A4%BA%E3%81%99%E3%82%8B\">\u30d6\u30e9\u30a6\u30b6\u3067\u8868\u793a\u3059\u308b.<\/h3>\n<p>http:\/\/localhost:8000\/WpPost\/1<\/p>\n<p><a href=\"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2019\/04\/images20190429_02org.jpg\"><img decoding=\"async\" src=\"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2019\/04\/images20190429_02thum.jpg\"><\/a><\/p>\n<p>MVC \u30d1\u30bf\u30fc\u30f3\u306e\u95a2\u4fc2\u306f\u3053\u3046\u306a\u3063\u3066\u3044\u308b\u3002<\/p>\n<p><a href=\"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2019\/04\/images20190430_02org.jpg\"><img decoding=\"async\" src=\"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2019\/04\/images20190430_02thum.jpg\"><\/a><\/p>\n<h2 id=\"create-%E3%83%9A%E3%83%BC%E3%82%B8%E3%82%92%E8%BF%BD%E5%8A%A0\">Create \u30da\u30fc\u30b8\u3092\u8ffd\u52a0<\/h2>\n<p>\u65b0\u898f\u4f5c\u6210\u306e\u30da\u30fc\u30b8\u3092\u4f5c\u308b\u3002<\/p>\n<ul>\n<li>\u65b0\u898f\u5165\u529b\u3092\u3059\u308b create<\/li>\n<li>\u30c7\u30fc\u30bf\u3092\u767b\u9332\u3059\u308b store<\/li>\n<\/ul>\n<p>\u306b\u5206\u304b\u308c\u308b<\/p>\n<h3 id=\"model-%E3%82%92%E4%BF%AE%E6%AD%A3\">Model \u3092\u4fee\u6b63<\/h3>\n<p>\/app\/Models\/wp_posts.php \u3092\u4fee\u6b63<\/p>\n<ul>\n<li>ID \u304c\u81ea\u52d5\u30a4\u30f3\u30af\u30ea\u30e1\u30f3\u30c8\u306a\u306e\u3067\u9664\u5916\u3059\u308b<\/li>\n<li>create_at, update_at \u3092\u9664\u5916\u3059\u308b<\/li>\n<li>\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u3092\u88dc\u3046<\/li>\n<\/ul>\n<pre class=\"hljs\"><code>\n<div>class WpPost extends Model\n{\n    \/\/ ID\u306f\u81ea\u52d5\u30a4\u30f3\u30af\u30ea\u30e1\u30f3\u30c8\n    protected $guarded = array('ID');\n    \/\/ \u4f5c\u6210\u65e5\u3001\u66f4\u65b0\u65e5\u306f\u306a\u3057\n    const CREATED_AT = null;\n    const UPDATED_AT = null;\n\n    public function __construct() {\n        \/\/ insert \u6642\u306b\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u3092\u88dc\u3063\u3066\u304a\u304f\n        $this-&gt;post_excerpt = '';\n        $this-&gt;to_ping = '';\n        $this-&gt;pinged = '';\n        $this-&gt;post_content_filtered = '';\n    }\n}\n<\/div>\n<\/code><\/pre>\n<h3 id=\"controller-%E3%82%92%E8%BF%BD%E5%8A%A0\">Controller \u3092\u8ffd\u52a0<\/h3>\n<p>\/app\/Http\/Controllers\/WpPostController.php \u3092\u7de8\u96c6<\/p>\n<pre class=\"hljs\"><code>\n<div>class WpPostController extends Controller\n{\n    ...\n    \/\/\/ \u65b0\u898f\u4f5c\u6210\uff08\u5165\u529b\uff09\n    public function create() {\n        $item = new WpPost();\n        return view('WpPost.create', ['item' =&gt; $item]);\n    }\n    \/\/\/ \u65b0\u898f\u5165\u529b\uff08\u767b\u9332\uff09\n    public function store( Request $request ) {\n        $item = new WpPost();\n        $form = $request-&gt;all();\n        unset($form['_token']);\n        $item-&gt;fill($form);\n        \/\/ \u73fe\u5728\u6642\u523b\u3092\u5165\u308c\u3066\u304a\u304f\n        $item-&gt;post_date = date('Y-m-d H:i:s');\n        $item-&gt;save();\n        return redirect('\/WpPost');\n    }\n}\n<\/div>\n<\/code><\/pre>\n<h3 id=\"view-%E3%82%92%E4%BD%9C%E6%88%90%E3%81%99%E3%82%8B\">View \u3092\u4f5c\u6210\u3059\u308b<\/h3>\n<p>\/resources\/views\/WpPost\/create.blade.php \u3092\u65b0\u898f\u4f5c\u6210\u3059\u308b\u3002<\/p>\n<pre class=\"hljs\"><code>\n<div>@extends('layouts.app')\n@section('title','WpPost.create')\n@section('content')\n    &lt;form action=\"\/WpPost\/create\" method=\"post\" &gt;\n    {{ csrf_field() }}\n    &lt;table&gt;\n        &lt;tr&gt;\n            &lt;td&gt;post_title&lt;\/td&gt;\n            &lt;td&gt;&lt;input type=\"text\" name=\"post_title\" value=\"{{ $item-&gt;post_title }}\" \/&gt;&lt;\/td&gt;\n        &lt;\/tr&gt;\n        &lt;tr&gt;\n            &lt;td&gt;post_content&lt;\/td&gt;\n            &lt;td&gt;&lt;input type=\"text\" name=\"post_content\" value=\"{{ $item-&gt;post_content }}\" \/&gt;&lt;\/td&gt;\n        &lt;\/tr&gt;\n    &lt;\/table&gt;\n    &lt;input type=\"submit\" \/&gt;\n    &lt;\/form&gt;\n@endsection\n\n<\/div>\n<\/code><\/pre>\n<h3 id=\"%E3%83%AB%E3%83%BC%E3%83%88%E6%83%85%E5%A0%B1%E3%82%92%E8%BF%BD%E5%8A%A0\">\u30eb\u30fc\u30c8\u60c5\u5831\u3092\u8ffd\u52a0<\/h3>\n<p>\/routes\/web.php \u306b\u8ffd\u52a0\u3059\u308b<\/p>\n<ul>\n<li>create \u3068 store \u306f\u3001show \u306e\u524d\u306b\u5165\u308c\u308b<\/li>\n<\/ul>\n<pre class=\"hljs\"><code>\n<div>Route::get('WpPost', 'WpPostController@index');\nRoute::get('WpPost\/create', 'WpPostController@create');\nRoute::post('WpPost\/create', 'WpPostController@store');\nRoute::get('WpPost\/{id}', 'WpPostController@show');\n<\/div>\n<\/code><\/pre>\n<h3 id=\"%E3%83%96%E3%83%A9%E3%82%A6%E3%82%B6%E3%81%A7%E8%A1%A8%E7%A4%BA%E3%81%99%E3%82%8B\">\u30d6\u30e9\u30a6\u30b6\u3067\u8868\u793a\u3059\u308b.<\/h3>\n<p>http:\/\/localhost:8000\/WpPost\/create<\/p>\n<p><a href=\"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2019\/04\/images20190429_03org.jpg\"><img decoding=\"async\" src=\"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2019\/04\/images20190429_03thum.jpg\"><\/a><\/p>\n<p>\u30a8\u30e9\u30fc\u304c\u306a\u3051\u308c\u3070\u3001\u4e00\u89a7\u3078\u623b\u308b<\/p>\n<p><a href=\"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2019\/04\/images20190429_04org.jpg\"><img decoding=\"async\" src=\"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2019\/04\/images20190429_04thum.jpg\"><\/a><\/p>\n<h2 id=\"%E7%B7%A8%E9%9B%86%E7%94%BB%E9%9D%A2%E3%82%92%E4%BD%9C%E3%82%8B\">\u7de8\u96c6\u753b\u9762\u3092\u4f5c\u308b<\/h2>\n<ul>\n<li>\u66f4\u65b0\u60c5\u5831\u3092\u5165\u529b\u3059\u308b\u753b\u9762<\/li>\n<li>\u66f4\u65b0\u51e6\u7406\u3092\u3059\u308b<\/li>\n<\/ul>\n<p>\u306e2\u3064\u306e\u30a2\u30af\u30b7\u30e7\u30f3\u306e\u5206\u304b\u308c\u308b<\/p>\n<h3 id=\"model-%E3%81%AE%E4%BF%AE%E6%AD%A3\">Model \u306e\u4fee\u6b63<\/h3>\n<p>\/app\/Models\/wp_posts.php \u3092\u4fee\u6b63<\/p>\n<ul>\n<li>\u30d7\u30e9\u30a4\u30de\u30ea\u2015\u30ad\u30fc\u304c \u300cid\u300d\u4ee5\u5916\u306e\u6642\u306f $primaryKey \u3067\u8a2d\u5b9a<\/li>\n<\/ul>\n<pre class=\"hljs\"><code>\n<div>class WpPost extends Model\n{\n    \/\/ ID\u306f\u81ea\u52d5\u30a4\u30f3\u30af\u30ea\u30e1\u30f3\u30c8\u306a\u306e\u3067\u9664\u5916\n    public $incrementing = true ;\n    protected $guarded = array('ID');\n    \/\/ \u30d7\u30e9\u30a4\u30de\u30ea\u30fc\u30ad\u30fc\u540d\u3092\u5909\u66f4\n    protected $primaryKey = 'ID';\n    \/\/ \u4f5c\u6210\u65e5\u3001\u66f4\u65b0\u65e5\u306f\u306a\u3057\n    const CREATED_AT = null;\n    const UPDATED_AT = null;\n\n    public function __construct() {\n        \/\/ insert \u6642\u306b\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u3092\u88dc\u3063\u3066\u304a\u304f\n        $this-&gt;post_excerpt = '';\n        $this-&gt;to_ping = '';\n        $this-&gt;pinged = '';\n        $this-&gt;post_content_filtered = '';\n    }\n}\n<\/div>\n<\/code><\/pre>\n<h3 id=\"controller-%E3%82%92%E4%BD%9C%E3%82%8B\">Controller \u3092\u4f5c\u308b<\/h3>\n<p>\/app\/Http\/Controllers\/WpPostController.php \u3092\u7de8\u96c6<\/p>\n<pre class=\"hljs\"><code>\n<div>class WpPostController extends Controller\n{\n    ...\n    \/\/\/ \u66f4\u65b0\uff08\u5165\u529b\uff09\n    public function edit($id) {\n        $item = WpPost::find($id);\n        return view('WpPost.edit', ['item' =&gt; $item]);\n    }\n    \/\/\/ \u66f4\u65b0\uff08\u30b3\u30df\u30c3\u30c8\uff09\n    public function update(Request $request) {\n        $item = new WpPost();\n        $form = $request-&gt;all();\n        $id = $form['ID'];\n        unset($form['_token']);\n        $item = WpPost::find($id);\n        $item-&gt;fill($form);\n        \/\/ \u66f4\u65b0\u65e5\u6642\u3092\u5165\u308c\u3066\u304a\u304f\n        $item-&gt;post_modified = date('Y-m-d H:i:s');\n        $item-&gt;save();\n        \/\/ \u4e00\u89a7\u3078\u623b\u308b\n        return redirect('\/WpPost');\n    }\n}\n<\/div>\n<\/code><\/pre>\n<h3 id=\"view-%E3%82%92%E4%BD%9C%E6%88%90%E3%81%99%E3%82%8B\">View \u3092\u4f5c\u6210\u3059\u308b<\/h3>\n<p>\/resources\/views\/WpPost\/edit.blade.php \u3092\u65b0\u898f\u4f5c\u6210\u3059\u308b\u3002<\/p>\n<pre class=\"hljs\"><code>\n<div>@extends('layouts.app')\n@section('title','WpPost.edit')\n@section('content')\n    &lt;form action=\"\/WpPost\/edit\" method=\"post\" &gt;\n    {{ csrf_field() }}\n    &lt;input type=\"hidden\" name=\"ID\" value=\"{{ $item-&gt;ID }}\" \/&gt;\n    &lt;table&gt;\n        &lt;tr&gt;\n            &lt;td&gt;post_title&lt;\/td&gt;\n            &lt;td&gt;&lt;input type=\"text\" name=\"post_title\" value=\"{{ $item-&gt;post_title }}\" \/&gt;&lt;\/td&gt;\n        &lt;\/tr&gt;\n        &lt;tr&gt;\n            &lt;td&gt;post_content&lt;\/td&gt;\n            &lt;td&gt;&lt;input type=\"text\" name=\"post_content\" value=\"{{ $item-&gt;post_content }}\" \/&gt;&lt;\/td&gt;\n        &lt;\/tr&gt;\n    &lt;\/table&gt;\n    &lt;input type=\"submit\" \/&gt;\n    &lt;\/form&gt;\n@endsection\n\n<\/div>\n<\/code><\/pre>\n<h3 id=\"%E3%83%AB%E3%83%BC%E3%83%88%E6%83%85%E5%A0%B1%E3%82%92%E8%BF%BD%E5%8A%A0\">\u30eb\u30fc\u30c8\u60c5\u5831\u3092\u8ffd\u52a0<\/h3>\n<p>\/routes\/web.php \u306b\u8ffd\u52a0\u3059\u308b<\/p>\n<ul>\n<li>create \u3068 update \u306f\u3001show \u306e\u524d\u306b\u5165\u308c\u308b<\/li>\n<li>update \u306e\u307b\u3046\u306b\u3001id \u304c\u542b\u3081\u3089\u308c\u306a\u3044\u306e\u3067\u3001form \u304b\u3089\u53d6\u5f97\u3059\u308b<\/li>\n<\/ul>\n<pre class=\"hljs\"><code>\n<div>Route::get('WpPost\/edit\/{id}', 'WpPostController@edit');\nRoute::post('WpPost\/edit', 'WpPostController@update');\nRoute::get('WpPost\/{id}', 'WpPostController@show');\n<\/div>\n<\/code><\/pre>\n<h3 id=\"%E3%83%96%E3%83%A9%E3%82%A6%E3%82%B6%E3%81%A7%E8%A1%A8%E7%A4%BA%E3%81%99%E3%82%8B\">\u30d6\u30e9\u30a6\u30b6\u3067\u8868\u793a\u3059\u308b.<\/h3>\n<p>http:\/\/localhost:8000\/WpPost\/create<\/p>\n<p><a href=\"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2019\/04\/images20190429_05org.jpg\"><img decoding=\"async\" src=\"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2019\/04\/images20190429_05thum.jpg\"><\/a><\/p>\n<p>\u30a8\u30e9\u30fc\u304c\u306a\u3051\u308c\u3070\u3001\u4e00\u89a7\u3078\u623b\u308b<\/p>\n<p><a href=\"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2019\/04\/images20190429_06org.jpg\"><img decoding=\"async\" src=\"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2019\/04\/images20190429_06thum.jpg\"><\/a><\/p>\n<h2 id=\"%E3%82%A2%E3%82%A4%E3%83%86%E3%83%A0%E3%82%92%E5%89%8A%E9%99%A4%E3%81%99%E3%82%8B\">\u30a2\u30a4\u30c6\u30e0\u3092\u524a\u9664\u3059\u308b<\/h2>\n<ul>\n<li>\u66f4\u65b0\u753b\u9762\u306b\u300c\u524a\u9664\u300d\u30dc\u30bf\u30f3\u3092\u8ffd\u52a0\u3059\u308b<\/li>\n<li>\u524a\u9664\u51e6\u7406\u3092\u3059\u308b<\/li>\n<\/ul>\n<p>\u306e2\u3064\u306e\u30a2\u30af\u30b7\u30e7\u30f3\u306e\u5206\u304b\u308c\u308b<\/p>\n<h3 id=\"controller-%E3%82%92%E4%BD%9C%E3%82%8B\">Controller \u3092\u4f5c\u308b<\/h3>\n<p>\/app\/Http\/Controllers\/WpPostController.php \u3092\u7de8\u96c6<\/p>\n<pre class=\"hljs\"><code>\n<div>class WpPostController extends Controller\n{\n    ...\n    \/\/\/ \u524a\u9664\n    public function destroy( Request $request ) {\n        $form = $request-&gt;all();\n        $id = $form['ID'];\n        WpPost::find($id)-&gt;delete();\n        \/\/ \u4e00\u89a7\u3078\u623b\u308b\n        return redirect('\/WpPost');\n    }\n}\n<\/div>\n<\/code><\/pre>\n<h3 id=\"view-%E3%82%92%E7%B7%A8%E9%9B%86%E3%81%99%E3%82%8B\">View \u3092\u7de8\u96c6\u3059\u308b<\/h3>\n<p>\/resources\/views\/WpPost\/edit.blade.php \u306b\u8ffd\u8a18\u3059\u308b<\/p>\n<p>\u4e0b\u306e\u307b\u3046\u306b\u300c\u524a\u9664\u300d\u30dc\u30bf\u30f3\u3092\u4ed8\u3051\u308b\u3002<\/p>\n<pre class=\"hljs\"><code>\n<div>@extends('layouts.app')\n@section('title','WpPost.edit')\n@section('content')\n    &lt;form action=\"\/WpPost\/edit\" method=\"post\" &gt;\n    {{ csrf_field() }}\n    &lt;input type=\"hidden\" name=\"ID\" value=\"{{ $item-&gt;ID }}\" \/&gt;\n    &lt;table&gt;\n        &lt;tr&gt;\n            &lt;td&gt;post_title&lt;\/td&gt;\n            &lt;td&gt;&lt;input type=\"text\" name=\"post_title\" value=\"{{ $item-&gt;post_title }}\" \/&gt;&lt;\/td&gt;\n        &lt;\/tr&gt;\n        &lt;tr&gt;\n            &lt;td&gt;post_content&lt;\/td&gt;\n            &lt;td&gt;&lt;input type=\"text\" name=\"post_content\" value=\"{{ $item-&gt;post_content }}\" \/&gt;&lt;\/td&gt;\n        &lt;\/tr&gt;\n    &lt;\/table&gt;\n    &lt;input type=\"submit\" \/&gt;\n    &lt;\/form&gt;\n\n\n    &lt;script&gt;\n        function check(){ return window.confirm('\u524a\u9664\u3057\u3066\u3088\u308d\u3057\u3044\u3067\u3059\u304b\uff1f'); }\n    &lt;\/script&gt;\n    &lt;form action=\"\/WpPost\/delete\" method=\"post\" onSubmit=\"return check()\" &gt;\n        {{ csrf_field() }}\n        &lt;input type=\"hidden\" name=\"ID\" value=\"{{ $item-&gt;ID }}\" \/&gt;\n        &lt;input type=\"submit\" value=\"\u524a\u9664\" \/&gt;\n    &lt;\/form&gt;\n\n@endsection\n\n<\/div>\n<\/code><\/pre>\n<h3 id=\"%E3%83%AB%E3%83%BC%E3%83%88%E6%83%85%E5%A0%B1%E3%82%92%E8%BF%BD%E5%8A%A0\">\u30eb\u30fc\u30c8\u60c5\u5831\u3092\u8ffd\u52a0<\/h3>\n<p>\/routes\/web.php \u306b\u8ffd\u52a0\u3059\u308b<\/p>\n<ul>\n<li>destroy \u306f\u3001show \u306e\u524d\u306b\u5165\u308c\u308b<\/li>\n<li>destroy \u306b\u3001id \u304c\u542b\u3081\u3089\u308c\u306a\u3044\u306e\u3067\u3001form \u304b\u3089\u53d6\u5f97\u3059\u308b<\/li>\n<\/ul>\n<pre class=\"hljs\"><code>\n<div>Route::post('WpPost\/delete', 'WpPostController@destroy');\nRoute::get('WpPost\/{id}', 'WpPostController@show');\n<\/div>\n<\/code><\/pre>\n<h3 id=\"%E3%83%96%E3%83%A9%E3%82%A6%E3%82%B6%E3%81%A7%E8%A1%A8%E7%A4%BA%E3%81%99%E3%82%8B\">\u30d6\u30e9\u30a6\u30b6\u3067\u8868\u793a\u3059\u308b.<\/h3>\n<p>http:\/\/localhost:8000\/WpPost\/edit\/10<\/p>\n<p><a href=\"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2019\/04\/images20190429_07org.jpg\"><img decoding=\"async\" src=\"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2019\/04\/images20190429_07thum.jpg\"><\/a><\/p>\n<p>\u300c\u524a\u9664\u300d\u30dc\u30bf\u30f3\u3092\u62bc\u3057\u305f\u3068\u304d\u306b\u554f\u3044\u5408\u308f\u305b\u306e\u30c0\u30a4\u30a2\u30ed\u30b0\u304c\u51fa\u308b\u3002<\/p>\n<p><a href=\"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2019\/04\/images20190429_08org.jpg\"><img decoding=\"async\" src=\"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2019\/04\/images20190429_08thum.jpg\"><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3072\u3068\u307e\u305a\u3001Laravel \u306b\u6163\u308c\u308b\u305f\u3081\u306b MVC \u30d1\u30bf\u30fc\u30f3\u3092\u76f4\u63a5\u6271\u3063\u3066\u307f\u308b\u3002\u5148\u306b InfyOm \u3092\u4f7f\u3063\u3066\u81ea\u52d5\u4f5c\u6210\u3057\u3066\u307f\u305f\u306e\u3060\u304c\u3001\u30a8\u30e9\u30fc\u304c\u983b\u767a\u3057\u3066\u3088\u304f\u308f\u304b\u3089\u3093\u3002\u306e\u3067\u3001\u305d\u3046\u3044\u3046\u3068\u304d\u306f\u624b\u4f5c\u696d\u3067\u3084\u3063\u3066\u307f\u308b\u306b\u9650\u308b\u3002 \u76ee\u7684\u3068\u3057\u3066\u306f\u3001 &hellip; <a href=\"http:\/\/www.moonmile.net\/blog\/archives\/10005\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3,90],"tags":[],"class_list":["post-10005","post","type-post","status-publish","format-standard","hentry","category-dev","category-php"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts\/10005","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/comments?post=10005"}],"version-history":[{"count":5,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts\/10005\/revisions"}],"predecessor-version":[{"id":10065,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts\/10005\/revisions\/10065"}],"wp:attachment":[{"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/media?parent=10005"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/categories?post=10005"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/tags?post=10005"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}