{"id":4966,"date":"2019-11-15T03:36:45","date_gmt":"2019-11-14T18:36:45","guid":{"rendered":"https:\/\/blog.capilano-fw.com\/?p=4966"},"modified":"2019-11-15T03:36:45","modified_gmt":"2019-11-14T18:36:45","slug":"%e3%80%90laravel%e3%80%91%e3%83%ad%e3%82%b0%e3%82%a4%e3%83%b3%e6%97%a5%e6%99%82%e3%81%ae%e7%b5%b1%e8%a8%88%e3%82%92%e3%81%a8%e3%81%a3%e3%81%a6%e6%a3%92%e3%82%b0%e3%83%a9%e3%83%95%e3%81%ab%e3%81%97","status":"publish","type":"post","link":"https:\/\/blog.capilano-fw.com\/?p=4966","title":{"rendered":"\u3010Laravel\u3011\u30ed\u30b0\u30a4\u30f3\u65e5\u6642\u306e\u7d71\u8a08\u3092\u3068\u3063\u3066\u68d2\u30b0\u30e9\u30d5\u306b\u3057\u3066\u307f\u308b"},"content":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u3053\u3053\u6570\u56de<code>Laravel<\/code>\u306e\u8a71\u984c\u3092\u304a\u5c4a\u3051\u3057\u307e\u3057\u305f\u306e\u3067\u3001\u3053\u306e\u6d41\u308c\u3067\u3082\u3046\uff11\u3064<code>Laravel<\/code>\u306e\u8a18\u4e8b\u3092\u304a\u5c4a\u3051\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u4eca\u56de\u306f\u304a\u305d\u3089\u304f\u8a2a\u554f\u30e6\u30fc\u30b6\u30fc\u5411\u3051\u3068\u8a00\u3046\u3088\u308a\u306f\u3001\u904b\u55b6\u8005\u5074\u304c\u307b\u3057\u304c\u308b\u3088\u3046\u306a\u5185\u5bb9\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304c\u3001\u305d\u306e\u5185\u5bb9\u306f\u3068\u3044\u3046\u3068\u3001<\/p>\n<p><strong style=\"font-size: 35px;\">\u30b5\u30a4\u30c8\u306e\u96c6\u8a08\u30c7\u30fc\u30bf\u3092\u30c1\u30e3\u30fc\u30c8\u3067\u8868\u793a\u3059\u308b<\/strong><\/p>\n<p>\u3068\u3044\u3046\u3082\u306e\u3067\u3059\u3002<\/p>\n<p>\u30b5\u30a4\u30c8\u306e\u96c6\u8a08\u30c7\u30fc\u30bf\u3068\u3044\u3048\u3070\u3001<code>Google Analytics<\/code>\u304c\u6709\u540d\u3067\u3059\u304c\u3042\u308c\u306f\u30d6\u30e9\u30a6\u30b6\u3067\u306e\u30a2\u30af\u30bb\u30b9\u306b\u9650\u3089\u308c\u305f\u30c7\u30fc\u30bf\u3067\u3059\u3002<\/p>\n<p>\u305d\u306e\u305f\u3081\u3001\u4f8b\u3048\u3070\u300c\u6ce8\u6587\u3092\u53d7\u3051\u305f\u56de\u6570\u306e\u96c6\u8a08\u30c7\u30fc\u30bf\u300d\u306a\u3069\u3088\u308a\u8907\u96d1\u306a\u30c7\u30fc\u30bf\u96c6\u8a08\u3092\u3057\u3088\u3046\u3068\u601d\u3046\u3068\u3001\u81ea\u524d\u3067\u5b9f\u88c5\u3059\u308b\u3057\u304b\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<p>\u305d\u3053\u3067\uff01<\/p>\n<p>\u4eca\u56de\u306f\u3001\u30ed\u30b0\u30a4\u30f3\u3057\u305f\u65e5\u6642\u3092\u96c6\u8a08\u3057\u3066\u300c\u30ed\u30b0\u30a4\u30f3\u3059\u308b\u306e\u304c\u591a\u3044\u6642\u9593\u5e2f\u306f\u3044\u3064\uff1f\u300d\u304c\u5206\u304b\u308b\u30b3\u30f3\u30c6\u30f3\u30c4\u3092<code>Laravel<\/code>\u3067\u4f5c\u3063\u3066\u307f\u305f\u3044\u3068\u601d\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<br \/>\n\uff08\u6700\u5f8c\u306b\u4eca\u56de\u958b\u767a\u3057\u305f\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u4e00\u5f0f\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\uff09<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3566 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/04\/no_1.png\" alt=\"\" width=\"306\" height=\"320\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/04\/no_1.png 306w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/04\/no_1-287x300.png 287w\" sizes=\"auto, (max-width: 306px) 100vw, 306px\" \/><\/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>\u4eca\u56de\u306f\u300c\u5404\u6642\u9593\u3054\u3068\u306e\u30ed\u30b0\u30a4\u30f3\u56de\u6570\u3092\u6708\u5358\u4f4d\u3067\u300d\u96c6\u8a08\u3059\u308b\u3053\u3068\u306b\u3057\u307e\u3059\u3002<br \/>\n\u3064\u307e\u308a\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308c\u3070\u6210\u529f\u3067\u3059\u3002<\/p>\n<ul>\n<li>\u300c\u5148\u6708\u306f14\u6642\u53f0\u304c\u4e00\u756a\u30ed\u30b0\u30a4\u30f3\u304c\u591a\u304b\u3063\u305f\u306e\u304b\ud83d\ude0a\u300d<\/li>\n<li>\u300c\u4eca\u6708\u306f19\u6642\u53f0\u306e\u30ed\u30b0\u30a4\u30f3\u304c\u5c11\u306a\u3044\u305e\ud83d\ude2b\u300d<\/li>\n<li>\u300c\u610f\u5916\u3068\u6df1\u591c1\u6642\u3067\u3082\u30ed\u30b0\u30a4\u30f3\u56de\u6570\u306f\u5c11\u306a\u304f\u306a\u3044\u306a\u30fc\ud83d\ude33\u300d<\/li>\n<\/ul>\n<p>\u3067\u306f\u3001\u5b9f\u969b\u306b\u3084\u3063\u3066\u3044\u304d\u307e\u3057\u3087\u3046\uff01<\/p>\n<h1>\u524d\u63d0\u3068\u3057\u3066<\/h1>\n<p>\u4eca\u56de\u3082\u30ed\u30b0\u30a4\u30f3\u6a5f\u80fd\u304c<code>Laravel<\/code>\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u304c\u524d\u63d0\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u3082\u3057\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u307e\u3060\u306e\u65b9\u306f\u4ee5\u4e0b\u3092\u53c2\u8003\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<ul>\n<li>Laravel 6.x \u4ee5\u4e0a\u3000\u30fb\u30fb\u30fb\u3000<a href=\"https:\/\/blog.capilano-fw.com\/?p=4576\">Laravel6.0\u3067\u30ed\u30b0\u30a4\u30f3\u6a5f\u80fd\u3092\u4f7f\u3046\u65b9\u6cd5<\/a><\/li>\n<li>\u305d\u308c\u672a\u6e80\u3000\u30fb\u30fb\u30fb\u3000<a href=\"https:\/\/blog.capilano-fw.com\/?p=289\">\u3010Laravel5.6\u3011\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u76f4\u5f8c\u306b\u3084\u308b\u3053\u3068\uff13\u70b9<\/a><\/li>\n<\/ul>\n<h1>\u30e2\u30c7\u30eb\u3068\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u3092\u3064\u304f\u308b<\/h1>\n<p>\u307e\u305a\u306f\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u30ed\u30b0\u30a4\u30f3\u96c6\u8a08\u306b\u5fc5\u8981\u306a\u30e2\u30c7\u30eb\uff06\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<pre><strong>php artisan make:model Login -m<\/strong><\/pre>\n<p>\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u305f\u3089<code>database\/migrations\/****_**_**_******_create_logins_table.php<\/code>\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c\u307e\u3059\u306e\u3067\u3001\u305d\u308c\u3089\u3092\u958b\u3044\u3066\u4e2d\u8eab\u3092\u6b21\u306e\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<pre>public function up()\r\n{\r\n    <strong>Schema::create('logins', function (Blueprint $table) {<\/strong>\r\n<strong>        $table-&gt;bigIncrements('id');<\/strong>\r\n<strong>        $table-&gt;unsignedBigInteger('user_id')-&gt;comment('\u30e6\u30fc\u30b6\u30fcID');<\/strong>\r\n<strong>        $table-&gt;unsignedInteger('year')-&gt;comment('\u30ed\u30b0\u30a4\u30f3\u30fb\u5e74');<\/strong>\r\n<strong>        $table-&gt;unsignedInteger('month')-&gt;comment('\u30ed\u30b0\u30a4\u30f3\u30fb\u6708');<\/strong>\r\n<strong>        $table-&gt;unsignedInteger('day')-&gt;comment('\u30ed\u30b0\u30a4\u30f3\u30fb\u65e5');<\/strong>\r\n<strong>        $table-&gt;unsignedInteger('hour')-&gt;comment('\u30ed\u30b0\u30a4\u30f3\u30fb\u6642');<\/strong>\r\n<strong>        $table-&gt;unsignedInteger('minute')-&gt;comment('\u30ed\u30b0\u30a4\u30f3\u30fb\u5206');<\/strong>\r\n<strong>        $table-&gt;unsignedInteger('second')-&gt;comment('\u30ed\u30b0\u30a4\u30f3\u30fb\u79d2');<\/strong>\r\n\r\n<strong>        $table-&gt;foreign('user_id')-&gt;references('id')-&gt;on('users');<\/strong>\r\n<strong>        $table-&gt;index(['year', 'month']);<\/strong>\r\n<strong>    });<\/strong>\r\n}<\/pre>\n<p>\u306a\u304a\u3001\u96c6\u8a08\u304c\u9ad8\u901f\u306b\u306a\u308b\u3088\u3046\u306b\u901a\u5e38\u306e<code>created_at<\/code>\u3068<code>updated_at<\/code>\u306f\u4f7f\u308f\u305a\u5404\u300c\u5e74\u30fb\u6708\u30fb\u65e5\u30fb\u6642\u30fb\u5206\u30fb\u79d2\u300d\u3092\u30c7\u30fc\u30bf\u3067\u4fdd\u6301\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u307e\u3059\u3002\u307e\u305f\u3001\u540c\u3058\u7406\u7531\u304b\u3089\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092<code>year + month<\/code>\u3067\u3064\u3051\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u306e\u305f\u3081\u3001<code>Login<\/code>\u30e2\u30c7\u30eb\u304c\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u3092\u4f7f\u308f\u306a\u3044\u3088\u3046\u306b<code>app\/Login.php<\/code>\u306b\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3092\u8ffd\u52a0\u3057\u3066\u304a\u3044\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre>&lt;?php\r\n\r\nnamespace App;\r\n\r\nuse Illuminate\\Database\\Eloquent\\Model;\r\n\r\nclass Login extends Model\r\n{\r\n    <strong>public $timestamps = false;  \/\/created_at,updated_at \u306f\u4f7f\u308f\u306a\u3044<\/strong>\r\n}<\/pre>\n<p>\u3067\u306f\u3001\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u3092\u5b9f\u884c\u3057\u3066\u30c6\u30fc\u30d6\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre><strong>php artisan migrate<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u3001\u30c6\u30fc\u30d6\u30eb\u306f\u3053\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4976\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/11\/login_stats_1.png\" alt=\"\" width=\"358\" height=\"318\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/11\/login_stats_1.png 358w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/11\/login_stats_1-300x266.png 300w\" sizes=\"auto, (max-width: 358px) 100vw, 358px\" \/><\/p>\n<h1>\u30ed\u30b0\u30a4\u30f3\u65e5\u6642\u3092\u4fdd\u5b58\u3059\u308b\u3088\u3046\u306b\u3059\u308b<\/h1>\n<p>\u7d9a\u3044\u3066\u3001\u30e6\u30fc\u30b6\u30fc\u304c\u30ed\u30b0\u30a4\u30f3\u3092\u3057\u305f\u3089\u81ea\u52d5\u7684\u306b\u5148\u307b\u3069\u4f5c\u6210\u3057\u305f<code>logins<\/code>\u30c6\u30fc\u30d6\u30eb\u306b\u30c7\u30fc\u30bf\u304c\u66f8\u304d\u8fbc\u307e\u308c\u308b\u3088\u3046\u306b\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><code>app\/Http\/Controllers\/Auth\/LoginController.php<\/code>\u306e\u4e2d\u306b\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3092\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre>\/\/ \u7701\u7565\r\n\r\nclass LoginController extends Controller\r\n{\r\n    \/\/ \u7701\u7565\r\n\r\n    <strong>protected function authenticated(Request $request, $user)<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        $dt = now();<\/strong>\r\n\r\n<strong>        $login = new \\App\\Login();<\/strong>\r\n<strong>        $login-&gt;user_id = $user-&gt;id;<\/strong>\r\n<strong>        $login-&gt;year = $dt-&gt;year;<\/strong>\r\n<strong>        $login-&gt;month = $dt-&gt;month;<\/strong>\r\n<strong>        $login-&gt;day = $dt-&gt;day;<\/strong>\r\n<strong>        $login-&gt;hour = $dt-&gt;hour;<\/strong>\r\n<strong>        $login-&gt;minute = $dt-&gt;minute;<\/strong>\r\n<strong>        $login-&gt;second = $dt-&gt;second;<\/strong>\r\n<strong>        $login-&gt;save();<\/strong>\r\n<strong>    }<\/strong>\r\n}<\/pre>\n<p>\u3053\u308c\u3067\u3001\u30ed\u30b0\u30a4\u30f3\u3092\u3059\u308b\u305f\u3073\u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30c7\u30fc\u30bf\u304c<code>logins<\/code>\u30c6\u30fc\u30d6\u30eb\u306b\u8ffd\u52a0\u3055\u308c\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4979\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/11\/login_stats_3.png\" alt=\"\" width=\"475\" height=\"271\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/11\/login_stats_3.png 475w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/11\/login_stats_3-300x171.png 300w\" sizes=\"auto, (max-width: 475px) 100vw, 475px\" \/><\/p>\n<h1>Seeder\u3067\u30c6\u30b9\u30c8\u30c7\u30fc\u30bf\u3092\u7528\u610f\u3059\u308b<\/h1>\n<p>\u3053\u306e\u307e\u307e\u96c6\u8a08\u90e8\u5206\u3092\u3064\u304f\u3063\u3066\u3082\u3044\u3044\u306e\u3067\u3059\u304c\u3001\u4f55\u56de\u3082\u30ed\u30b0\u30a4\u30f3\u3092\u3057\u3066\u30c7\u30fc\u30bf\u3092\u8ffd\u52a0\u3059\u308b\u306e\u306f\u6642\u9593\u304c\u304b\u304b\u308a\u307e\u3059\u306e\u3067\u3001<code>Seeder<\/code>\u3067\u30c6\u30b9\u30c8\u30c7\u30fc\u30bf\u3092\u3064\u304f\u308b\u3053\u3068\u306b\u3057\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><strong>php artisan make:seed LoginsTableSeeder<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u3001<code>database\/seeds\/LoginsTableSeeder.php<\/code>\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c\u308b\u306e\u3067<code>run()<\/code>\u5185\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5909\u66f4\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre>&lt;?php\r\n\r\nuse Illuminate\\Database\\Seeder;\r\n\r\nclass LoginsTableSeeder extends Seeder\r\n{\r\n    <strong>public function run()<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        $today = today();<\/strong>\r\n\r\n<strong>        for($i = 0 ; $i &lt; 500 ; $i++) {<\/strong>\r\n\r\n<strong>            $random_days = rand(1, 100);<\/strong>\r\n<strong>            $random_hours = rand(1, 23);<\/strong>\r\n<strong>            $dt = $today-&gt;copy()<\/strong>\r\n<strong>                -&gt;subDays(rand(1, 100))  \/\/ -1\u301c100\u65e5\u524d<\/strong>\r\n<strong>                -&gt;addHours(rand(1, 23))  \/\/ +1\u301c23\u6642\u9593<\/strong>\r\n<strong>                -&gt;addMinutes(rand(1, 59))  \/\/ +1\u301c23\u5206<\/strong>\r\n<strong>                -&gt;addSeconds(rand(1, 59));  \/\/ +1\u301c23\u79d2<\/strong>\r\n\r\n<strong>            $login = new \\App\\Login();<\/strong>\r\n<strong>            $login-&gt;user_id = 1;    \/\/ \u30c6\u30b9\u30c8\u306a\u306e\u3067\u30e6\u30fc\u30b6\u30fcID\u306f \"1\" \u3067\u56fa\u5b9a<\/strong>\r\n<strong>            $login-&gt;year = $dt-&gt;year;<\/strong>\r\n<strong>            $login-&gt;month = $dt-&gt;month;<\/strong>\r\n<strong>            $login-&gt;day = $dt-&gt;day;<\/strong>\r\n<strong>            $login-&gt;hour = $dt-&gt;hour;<\/strong>\r\n<strong>            $login-&gt;minute = $dt-&gt;minute;<\/strong>\r\n<strong>            $login-&gt;second = $dt-&gt;second;<\/strong>\r\n<strong>            $login-&gt;save();<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n<strong>    }<\/strong>\r\n}<\/pre>\n<p>\u30d5\u30a1\u30a4\u30eb\u3092\u5909\u66f4\u3057\u305f\u3089\u3001<code>database\/seeds\/DatabaseSeeder.php<\/code>\u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u767b\u9332\u3057\u307e\u3059\u3002<\/p>\n<pre>&lt;?php\r\n\r\nuse Illuminate\\Database\\Seeder;\r\n\r\nclass DatabaseSeeder extends Seeder\r\n{\r\n    \/**\r\n     * Seed the application's database.\r\n     *\r\n     * @return void\r\n     *\/\r\n    public function run()\r\n    {\r\n         \/\/ \u7701\u7565\r\n\r\n         <strong>$this-&gt;call(LoginsTableSeeder::class);<\/strong>\r\n    }\r\n}<\/pre>\n<p>\u3067\u306f\u3001<code>artisan<\/code>\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3063\u3066<code>Seeder<\/code>\u3092\u5b9f\u884c\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre><strong>php artisan db:seed<\/strong><\/pre>\n<p>\u3046\u307e\u304f\u3044\u304f\u3068<code>logins<\/code>\u30c6\u30fc\u30d6\u30eb\u306f\u3053\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4985\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/11\/login_stats_4.png\" alt=\"\" width=\"471\" height=\"471\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/11\/login_stats_4.png 471w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/11\/login_stats_4-150x150.png 150w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/11\/login_stats_4-300x300.png 300w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/11\/login_stats_4-100x100.png 100w\" sizes=\"auto, (max-width: 471px) 100vw, 471px\" \/><\/p>\n<p>\u3067\u306f\u3001\u3053\u306e\u30c7\u30fc\u30bf\u3092\u4f7f\u3063\u3066\u5b9f\u969b\u306b\u96c6\u8a08\u3092\u3057\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<h1>\u96c6\u8a08\u3057\u305f\u68d2\u30b0\u30e9\u30d5\u3092\u3064\u304f\u308b<\/h1>\n<p>\u3067\u306f\u3001\u3053\u3053\u304b\u3089\u304c\u5b9f\u969b\u306b\u96c6\u8a08\u30c7\u30fc\u30bf\u3092\u8868\u793a\u3057\u3066\u3044\u304f\u4f5c\u696d\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n\u30af\u30ea\u30c3\u30af\uff11\u3064\u3067\u300c\u5e74\u30fb\u6708\u300d\u3092\u5909\u66f4\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u305f\u3044\u306e\u3067\u3001\u30c7\u30fc\u30bf\u306f<code>Ajax<\/code>\u3092\u901a\u3057\u3066\u53d6\u5f97\u3059\u308b\u3053\u3068\u306b\u3057\u307e\u3059\u3002<\/p>\n<h2>\u30eb\u30fc\u30c8\u3092\u3064\u304f\u308b<\/h2>\n<p><code>routes\/web.php<\/code>\u306b\u4ee5\u4e0b\u3092\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><strong>Route::get('login_count', 'LoginCountController@index');<\/strong>\r\n<strong>Route::get('ajax\/login_count', 'LoginCountController@ajax_index');<\/strong><\/pre>\n<p>\u4e0a\u304c\u30d6\u30e9\u30a6\u30b6\u3067\u3001\u4e0b\u304c<code>Ajax<\/code>\u3067\u30a2\u30af\u30bb\u30b9\u3059\u308b\u30da\u30fc\u30b8\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2>\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3092\u3064\u304f\u308b<\/h2>\n<p>\u7d9a\u3044\u3066\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 LoginCountController<\/strong><\/pre>\n<p><code>app\/Http\/Controllers\/LoginCountController.php<\/code>\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c\u308b\u306e\u3067\u3001\u4e2d\u8eab\u3092\u6b21\u306e\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<pre>&lt;?php\r\n\r\nnamespace App\\Http\\Controllers;\r\n\r\nuse Illuminate\\Http\\Request;\r\n\r\nclass LoginCountController extends Controller\r\n{\r\n    <strong>public function index() {<\/strong>\r\n\r\n<strong>        return view('login_count');<\/strong>\r\n\r\n<strong>    }<\/strong>\r\n\r\n<strong>    public function ajax_index(Request $request) {<\/strong>\r\n\r\n<strong>        $year = date('Y');<\/strong>\r\n<strong>        $month = date('m');<\/strong>\r\n\r\n<strong>        if($request-&gt;filled('year', 'month')) {<\/strong>\r\n\r\n<strong>            $year = $request-&gt;year;<\/strong>\r\n<strong>            $month = $request-&gt;month;<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n\r\n<strong>        $logins = \\App\\Login::select('hour', \\DB::raw('COUNT(id) AS login_count'))<\/strong>\r\n<strong>            -&gt;where('year', $year)<\/strong>\r\n<strong>            -&gt;where('month', $month)<\/strong>\r\n<strong>            -&gt;groupBy('hour')<\/strong>\r\n<strong>            -&gt;pluck('login_count', 'hour');<\/strong>\r\n\r\n<strong>        $counts = [];<\/strong>\r\n\r\n<strong>        for($i = 0 ; $i &lt; 24 ; $i++) {<\/strong>\r\n\r\n<strong>            $counts[$i] = $logins-&gt;get($i, 0);  \/\/ \u5b58\u5728\u3057\u306a\u3044\u6642\u9593\u306f \"0\" \u56de<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n\r\n<strong>        return $counts;<\/strong>\r\n\r\n<strong>    }<\/strong>\r\n}<\/pre>\n<p>\u3053\u306e\u4e2d\u3067\u306f\u3001\u300c\u5e74\u30fb\u6708\u300d\u3067\u7d5e\u308a\u8fbc\u3093\u3060\u30c7\u30fc\u30bf\u3092\u30b0\u30eb\u30fc\u30d7\u5316\u3057\u3066\u6642\u9593\uff08hour\uff09\u3054\u3068\u306b\u30c7\u30fc\u30bf\u6570\u3092\u30ab\u30a6\u30f3\u30c8\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u305f\u3060\u3057\u3001\u4f8b\u3048\u307012\u6642\u53f0\u306b\u30c7\u30fc\u30bf\u304c\u5b58\u5728\u3057\u3066\u3044\u306a\u3044\u5834\u5408\u306f\u3001\u96c6\u8a08\u30c7\u30fc\u30bf\u304c\u5b58\u5728\u3057\u306a\u3044\u3053\u3068\u306b\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3059\u306e\u3067\u3001\u5b58\u5728\u3057\u306a\u3044\u6642\u9593\u306f<code>0<\/code>\u306b\u3059\u308b\u30b3\u30fc\u30c9\u3092\u8ffd\u52a0\u3057\u3066\u30c7\u30fc\u30bf\u3092\u4fee\u6b63\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<h2>\u30d3\u30e5\u30fc\u3092\u3064\u304f\u308b<\/h2>\n<p>\u3067\u306f\u3001\u5b9f\u969b\u30d6\u30e9\u30a6\u30b6\u3067\u76ee\u306b\u3059\u308b\u68d2\u30b0\u30e9\u30d5\u306e\u90e8\u5206\u3092\u3064\u304f\u3063\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<code>resources\/views\/login_count.blade.php<\/code>\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3066\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre>&lt;html&gt;\r\n&lt;body&gt;\r\n    &lt;div id=\"app\"&gt;\r\n        &lt;div&gt;\r\n            \u96c6\u8a08\uff1a\r\n            &lt;span v-text=\"year\"&gt;&lt;\/span&gt;\u5e74\r\n            &lt;span v-text=\"month\"&gt;&lt;\/span&gt;\u6708\r\n            &lt;button type=\"button\" @click=\"moveMonth(-1)\"&gt;\u524d\u3078&lt;\/button&gt;\r\n            &lt;button type=\"button\" @click=\"moveMonth(1)\"&gt;\u6b21\u3078&lt;\/button&gt;\r\n        &lt;\/div&gt;\r\n        &lt;canvas id=\"chart\"&gt;&lt;\/canvas&gt;\r\n    &lt;\/div&gt;\r\n    &lt;script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/axios\/0.19.0\/axios.min.js\"&gt;&lt;\/script&gt;\r\n    &lt;script src=\"https:\/\/cdn.jsdelivr.net\/npm\/vue@2.6.0\"&gt;&lt;\/script&gt;\r\n    &lt;script src=\"https:\/\/cdn.jsdelivr.net\/npm\/chart.js@2.9.2\/dist\/Chart.min.js\"&gt;&lt;\/script&gt;\r\n    &lt;script&gt;\r\n\r\n        new Vue({\r\n            el: '#app',\r\n            data: {\r\n                year: '',\r\n                month: '',\r\n                chart: null\r\n            },\r\n            methods: {\r\n                <strong>drawChart() {<\/strong>\r\n\r\n<strong>                    const url = '\/ajax\/login_count?year='+ this.year +'&amp;month='+ this.month;<\/strong>\r\n\r\n<strong>                    axios.get(url)<\/strong>\r\n<strong>                        .then(response =&gt; {<\/strong>\r\n\r\n<strong>                            const data = response.data;<\/strong>\r\n<strong>                            const ctx = document.getElementById('chart').getContext('2d');<\/strong>\r\n<strong>                            let labels = [];<\/strong>\r\n\r\n<strong>                            for(let i = 0 ; i &lt; 24 ; i++) {<\/strong>\r\n\r\n<strong>                                labels.push(i +'\u6642');<\/strong>\r\n\r\n<strong>                            }<\/strong>\r\n\r\n<strong>                            if(this.chart) {<\/strong>\r\n\r\n<strong>                                this.chart.destroy();<\/strong>\r\n\r\n<strong>                            }<\/strong>\r\n\r\n<strong>                            this.chart = new Chart(ctx, {<\/strong>\r\n<strong>                                type: 'bar',<\/strong>\r\n<strong>                                data: {<\/strong>\r\n<strong>                                    labels: labels,<\/strong>\r\n<strong>                                    datasets: [{<\/strong>\r\n<strong>                                        label: '\u30ed\u30b0\u30a4\u30f3\u56de\u6570',<\/strong>\r\n<strong>                                        data: data<\/strong>\r\n<strong>                                    }]<\/strong>\r\n<strong>                                },<\/strong>\r\n<strong>                                options: {<\/strong>\r\n<strong>                                    scales: {<\/strong>\r\n<strong>                                        yAxes: [{<\/strong>\r\n<strong>                                            ticks: {<\/strong>\r\n<strong>                                                stepSize: 1<\/strong>\r\n<strong>                                            }<\/strong>\r\n<strong>                                        }]<\/strong>\r\n<strong>                                    }<\/strong>\r\n<strong>                                }<\/strong>\r\n<strong>                            });<\/strong>\r\n\r\n<strong>                        });<\/strong>\r\n\r\n<strong>                },<\/strong>\r\n                moveMonth(number) {\r\n\r\n                    this.month += number;\r\n\r\n                    if(this.month === 0) {\r\n\r\n                        this.year--;\r\n                        this.month = 12;\r\n\r\n                    } else if(this.month === 13) {\r\n\r\n                        this.year++;\r\n                        this.month = 1;\r\n\r\n                    }\r\n\r\n                    this.drawChart();\r\n\r\n                }\r\n            },\r\n            mounted() {\r\n\r\n                const date = new Date();\r\n                this.year = date.getFullYear();\r\n                this.month = date.getMonth() + 1;\r\n                this.drawChart();\r\n\r\n            }\r\n        });\r\n\r\n    &lt;\/script&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;<\/pre>\n<p>\u5c11\u3057\u30b3\u30fc\u30c9\u304c\u9577\u3044\u3067\u3059\u304c\u3001\u91cd\u8981\u306a\u306e\u306f<code>drawChart()<\/code>\u306e\u90e8\u5206\u3060\u3051\u3067\u3059\u3002<\/p>\n<p>\u3053\u306e\u4e2d\u3067\u306f\u3001\u307e\u305a\u5148\u307b\u3069\u4f5c\u6210\u3057\u305f\u96c6\u8a08\u30d7\u30ed\u30b0\u30e9\u30e0\u306b<code>Ajax<\/code>\u3067\u30a2\u30af\u30bb\u30b9\u3057\u3066\u30c7\u30fc\u30bf\u3092\u3068\u3063\u3066\u304d\u307e\u3059\u3002<\/p>\n<p>\u305d\u3057\u3066\u3001\u305d\u306e\u30c7\u30fc\u30bf\u3092<a href=\"https:\/\/www.chartjs.org\/\" target=\"_blank\" rel=\"noopener noreferrer\">Chart.js<\/a>\u306b\u30bb\u30c3\u30c8\u3092\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u306a\u304a\u3001\u4ee5\u4e0b\u306e\u90e8\u5206\u3067Chart.js\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u30af\u30ea\u30a2\u3057\u3066\u3044\u308b\u3053\u3068\u306b\u6ce8\u76ee\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u3046\u3057\u306a\u3044\u3068\u300c\u5e74\u30fb\u6708\u300d\u3092\u5909\u66f4\u3057\u305f\u5834\u5408\u306b\u524d\u306e\u30c7\u30fc\u30bf\u304c\u6b8b\u3063\u3066\u3057\u307e\u3046\u3053\u3068\u306b\u306a\u308b\u304b\u3089\u3067\u3059\u3002\uff08\u63cf\u753b\u306f\u4e0a\u624b\u304f\u884c\u304d\u307e\u3059\u304c\u3001\u30dd\u30c3\u30d7\u30a2\u30c3\u30d7\u304c\u304a\u304b\u3057\u304f\u306a\u308a\u307e\u3059\uff09<\/p>\n<pre>if(this.chart) {\r\n\r\n    <strong>this.chart.destroy();<\/strong>\r\n\r\n}<\/pre>\n<p>\u304a\u75b2\u308c\u69d8\u3067\u3057\u305f\ud83d\ude0a\u2728<\/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\uff01<\/p>\n<p>\u307e\u305a\u306f\u4eca\u6708\u306e\u7d71\u8a08\u30c1\u30e3\u30fc\u30c8\u3067\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4989\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/11\/login_stats_5.png\" alt=\"\" width=\"615\" height=\"395\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/11\/login_stats_5.png 615w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/11\/login_stats_5-300x193.png 300w\" sizes=\"auto, (max-width: 615px) 100vw, 615px\" \/><\/p>\n<p>\u305d\u3057\u3066\u3001\u5148\u6708\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4990\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/11\/login_stats_6.png\" alt=\"\" width=\"615\" height=\"346\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/11\/login_stats_6.png 615w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/11\/login_stats_6-300x169.png 300w\" sizes=\"auto, (max-width: 615px) 100vw, 615px\" \/><\/p>\n<p>\u306f\u3044\uff01<br \/>\n\u3046\u307e\u304f\u3044\u304d\u307e\u3057\u305f\ud83d\ude0a\u2728<\/p>\n<h1>\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b<\/h1>\n<p>\u4eca\u56de\u5b9f\u969b\u306b\u958b\u767a\u3057\u305f\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u4e00\u5f0f\u3092\u4ee5\u4e0b\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u203b \u305f\u3060\u3057\u3001\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u306a\u3069\u306f\u3054\u81ea\u8eab\u3067\u5b9f\u884c\u3057\u3066\u3044\u305f\u3060\u304f\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<a  data-e-Disable-Page-Transition=\"true\" class=\"download-link\" title=\"\" href=\"https:\/\/blog.capilano-fw.com?download=4991&amp;tmstv=1777538097\" rel=\"nofollow\" id=\"download-link-4991\" data-redirect=\"false\" >\n\t\u3010Laravel\u3011\u30ed\u30b0\u30a4\u30f3\u65e5\u6642\u306e\u7d71\u8a08\u3092\u3068\u3063\u3066\u68d2\u30b0\u30e9\u30d5\u306b\u3057\u3066\u307f\u308b<\/a>\n\n<h1>\u304a\u308f\u308a\u306b<\/h1>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u4eca\u56de\u306f\u30ed\u30b0\u30a4\u30f3\u3057\u305f\u65e5\u6642\u3092\u96c6\u8a08\u3057\u3066\u68d2\u30b0\u30e9\u30d5\u3092\u3064\u304f\u3063\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p>\u3061\u306a\u307f\u306b\u3001\u4eca\u56de\u4f7f\u3063\u305f<code>Chart.js<\/code>\u306f\u68d2\u30b0\u30e9\u30d5\u3060\u3051\u3067\u306a\u304f\u3001\u5186\u30b0\u30e9\u30d5\u3084\u30ec\u30a4\u30c0\u30fc\u30c1\u30e3\u30fc\u30c8\u306a\u3069\u69d8\u3005\u306a\u30c1\u30e3\u30fc\u30c8\u4f5c\u6210\u304c\u3067\u304d\u307e\u3059\u306e\u3067\u3001\u3082\u3057\u8208\u5473\u304c\u3042\u308b\u65b9\u306f<a href=\"https:\/\/www.chartjs.org\/samples\/latest\/\" target=\"_blank\" rel=\"noopener noreferrer\">\u3053\u3061\u3089\u306e\u30b5\u30f3\u30d7\u30eb\u30da\u30fc\u30b8<\/a>\u3092\u3054\u89a7\u306b\u306a\u3063\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u306a\u304a\u3001\u4eca\u56de\u306e\u30b1\u30fc\u30b9\u3067\u306f\u30c7\u30fc\u30bf\u91cf\u304c\u591a\u304f\u306a\u3063\u3066\u304f\u308b\u3068\u30ec\u30b9\u30dd\u30f3\u30b9\u304c\u6975\u7aef\u306b\u9045\u304f\u306a\u308b\u3053\u3068\u304c\u60f3\u5b9a\u3055\u308c\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001\u3082\u3057\u305d\u3046\u306a\u3089\u306a\u3044\u3088\u3046\u306b\u5bfe\u51e6\u3057\u305f\u3044\u5834\u5408\u306f\u3001\u4f8b\u3048\u3070<code>login_counts<\/code>\u30c6\u30fc\u30d6\u30eb\u3092\u4f5c\u3063\u3066<code>cron<\/code>\u306a\u3069\u3067\u5b9a\u671f\u7684\u306b\u30c7\u30fc\u30bf\u3092\u96c6\u8a08\u3059\u308b\u3088\u3046\u306b\u3057\u3001<code>Ajax<\/code>\u306e\u53d6\u5f97\u306f\u3053\u306e\u96c6\u8a08\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u53d6\u5f97\u3059\u308b\u3088\u3046\u306b\u3059\u308b\u3068\u3044\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n<p>\u305c\u3072\u7686\u3055\u3093\u3082\u96c6\u8a08\u30c7\u30fc\u30bf\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u4f5c\u3063\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\u3053\u3053\u6570\u56deLaravel\u306e\u8a71\u984c\u3092\u304a\u5c4a\u3051\u3057\u307e\u3057\u305f\u306e\u3067\u3001\u3053\u306e\u6d41\u308c\u3067\u3082\u3046\uff11\u3064Laravel\u306e\u8a18\u4e8b\u3092\u304a\u5c4a\u3051\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002 \u4eca\u56de\u306f\u304a\u305d\u3089\u304f\u8a2a\u554f\u30e6\u30fc\u30b6\u30fc\u5411\u3051\u3068\u8a00 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.capilano-fw.com\/?p=4966\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;\u3010Laravel\u3011\u30ed\u30b0\u30a4\u30f3\u65e5\u6642\u306e\u7d71\u8a08\u3092\u3068\u3063\u3066\u68d2\u30b0\u30e9\u30d5\u306b\u3057\u3066\u307f\u308b&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":5000,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,12,97],"tags":[30],"class_list":["post-4966","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-laravel","category-vue-js","category-97","tag-chart-js"],"_links":{"self":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/4966","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=4966"}],"version-history":[{"count":13,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/4966\/revisions"}],"predecessor-version":[{"id":5001,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/4966\/revisions\/5001"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/media\/5000"}],"wp:attachment":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4966"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4966"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4966"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}