{"id":4398,"date":"2016-07-20T15:23:20","date_gmt":"2016-07-20T06:23:20","guid":{"rendered":"http:\/\/www.lancard.com\/blog\/?p=4398"},"modified":"2025-03-12T11:27:07","modified_gmt":"2025-03-12T02:27:07","slug":"laravel-5-1-%e3%81%a7%e3%83%ad%e3%82%b0%e5%87%ba%e5%8a%9b%e3%80%81%e3%81%9d%e3%81%ae%e5%be%8c-%e5%87%ba%e5%8a%9b%e3%83%ac%e3%83%99%e3%83%ab%e8%a8%ad%e5%ae%9a%e3%80%81%e3%82%af%e3%82%a8%e3%83%aa","status":"publish","type":"post","link":"https:\/\/www.lancard.com\/blog\/2016\/07\/20\/laravel-5-1-%e3%81%a7%e3%83%ad%e3%82%b0%e5%87%ba%e5%8a%9b%e3%80%81%e3%81%9d%e3%81%ae%e5%be%8c-%e5%87%ba%e5%8a%9b%e3%83%ac%e3%83%99%e3%83%ab%e8%a8%ad%e5%ae%9a%e3%80%81%e3%82%af%e3%82%a8%e3%83%aa\/","title":{"rendered":"Laravel 5.1 \u3067\u30ed\u30b0\u51fa\u529b\u3001\u305d\u306e\u5f8c (\u51fa\u529b\u30ec\u30d9\u30eb\u8a2d\u5b9a\u3001\u30af\u30a8\u30ea\u51fa\u529b)"},"content":{"rendered":"<blockquote><p>\n2017\/2\/1<br \/>\n\u4e0d\u5177\u5408\u304c\u3042\u3063\u305f\u306e\u3067<a href=\"http:\/\/www.lancard.com\/blog\/2017\/02\/01\/laravel-5-1-%e3%81%a7%e3%83%ad%e3%82%b0%e5%87%ba%e5%8a%9b%e3%80%81%e3%81%9d%e3%82%8c%e3%81%8b%e3%82%89-%e3%83%ad%e3%82%b0%e3%83%a1%e3%83%bc%e3%83%ab%e3%83%89%e3%83%a9%e3%82%a4%e3%83%90%e3%83%bc\/\">\u300eLaravel 5.1 \u3067\u30ed\u30b0\u51fa\u529b\u3001\u305d\u308c\u304b\u3089 (\u30ed\u30b0\u30e1\u30fc\u30eb\u30c9\u30e9\u30a4\u30d0\u30fc\u52d5\u4f5c\u4e0d\u826f\u5bfe\u51e6\u3001\u30af\u30a8\u30ea\u51fa\u529b\u306e\u8abf\u6574)\u300f<\/a>\u306e\u307b\u3046\u3092\u898b\u3066\u4e0b\u3055\u3044\n<\/p><\/blockquote>\n<p>\u5c11\u3057\u524d\u306b\u66f8\u3044\u305f<a href=\"http:\/\/www.lancard.com\/blog\/2016\/06\/16\/laravel-5-1-%E3%81%A7%E5%AE%9F%E8%A1%8C%E3%83%A6%E3%83%BC%E3%82%B6%E3%83%BC%E6%AF%8E%E3%81%AB%E3%83%AD%E3%82%B0%E5%87%BA%E5%8A%9B\/\">\u300eLaravel 5.1 \u3067\u5b9f\u884c\u30e6\u30fc\u30b6\u30fc\u6bce\u306b\u30ed\u30b0\u51fa\u529b\u300f<\/a>\u3068\u3044\u3046\u8a18\u4e8b\u306e\u7d9a\u304d\u7684\u306a\u3082\u306e\u3067\u3059\u3002<br \/>\n\u74b0\u5883\u3082\u5909\u308f\u3089\u305a Laravel Framework version 5.1.35 (LTS) \u3067\u3059\u3002<\/p>\n<p><strong>\u524d\u56de\u306e\u3042\u3089\u3059\u3058<\/strong><br \/>\n\u300c\u30ed\u30b0\u51fa\u529b\u6642\u306b\u5b9f\u884c\u30e6\u30fc\u30b6\u30fc\u540d\u30d9\u30fc\u30b9\u3067\u30ed\u30b0\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u308b\u3088\u3046\u306b\u3059\u308c\u3070\u30ed\u30b0\u30d5\u30a1\u30a4\u30eb\u306e\u6a29\u9650\u7d61\u307f\u306e\u30a8\u30e9\u30fc\u3092\u56de\u907f\u3067\u304d\u308b\u3057\u4f55\u51e6\u304b\u3089\u8d77\u52d5\u3055\u308c\u305f\u51e6\u7406\u304b\u308f\u304b\u308a\u3084\u3059\u304f\u306a\u3063\u3066\u826f\u304f\u306a\u3044\uff1f\u300d\u3068\u601d\u3063\u305f\u30dc\u30af\u3002AppServiceProvider\u306eboot()\u3067logger\u3092\u5dee\u3057\u66ff\u3048\u3064\u3064\u3082\u300c\u3053\u3053\u3067\u3084\u3063\u3061\u3083\u3063\u3066\u3044\u3044\u306e\u304b\u3057\u3089\u300d\u3068\u3044\u3046\u6238\u60d1\u3044\u3092\u611f\u3058\u305f\u308a\u3082\u3057\u3066\u2026<\/p>\n<hr \/>\n<p>\u3067\u3001\u6238\u60d1\u3063\u3066\u307e\u3057\u305f\u304c\u5b9f\u884c\u6e96\u5099\u306e\u4e00\u8cab\u3068\u3057\u3066AppServiceProvider\u3067\u3084\u3063\u3066\u3066\u554f\u984c\u306a\u3055\u305d\u3046\u304b\u306a\u3068\u601d\u3063\u3066\u307e\u3059\u3002\u30c4\u30c3\u30b3\u30df\u3082\u3053\u306a\u304b\u3063\u305f\u3057\u3002<\/p>\n<p>\u4eca\u56de\u306f\u5b9f\u969b\u306b\u958b\u767a\u3067\u4f7f\u3063\u3066\u3044\u3066<\/p>\n<p>\u30fb\u30c7\u30d0\u30c3\u30b0\u30d5\u30e9\u30b0(app.debug)\u3092\u843d\u3068\u3057\u305f\u72b6\u614b\u3067\u306fINFO\u4ee5\u4e0a\u306e\u30ed\u30b0\u306e\u307f\u51fa\u529b<br \/>\n\u30fb\u30c7\u30d0\u30c3\u30b0\u30d5\u30e9\u30b0(app.debug)\u3092\u7acb\u3066\u305f\u72b6\u614b\u3067\u306f\u767a\u884c\u3055\u308c\u305f\u30af\u30a8\u30ea\u3092DEBUG\u30ed\u30b0\u3067\u51fa\u529b<\/p>\n<p>\u3068\u3044\u3046\u6a5f\u80fd\u8ffd\u52a0\u3092\u3057\u305f\u306e\u3067\u3001\u305d\u306e\u7d39\u4ecb\u3067\u3059\u3002<\/p>\n<p><!--more--><\/p>\n<pre lang=\"php\">\nclass AppServiceProvider extends ServiceProvider\n{\n    public function boot()\n    {\n        $this->app->instance('log', new \\Illuminate\\Log\\Writer(\n                (new \\Monolog\\Logger(\n                    $this->app->environment()\n                ))->pushProcessor(\n                    new \\Monolog\\Processor\\IntrospectionProcessor(\n                        \\Monolog\\Logger::DEBUG,\n                        [\n                            'Monolog\\\\',\n                            'Illuminate\\\\',\n                            \/\/\u4ed6\u3001\u547c\u3073\u51fa\u3057\u5143\u3068\u3057\u3066\u306f\u30b9\u30ad\u30c3\u30d7\u3057\u305f\u3044\u5bfe\u8c61\u3092\u8a2d\u5b9a,\n                        ]\n                    )\n                )->pushHandler(\n                    new \\Monolog\\Handler\\RotatingFileHandler(\n                        $this->app->storagePath() . '\/logs\/' . posix_getpwuid(posix_geteuid())['name'] . '.log',\n                        \\Config::get('app.log_max_files', 5),\n                        \\Config::get('app.debug') ? \\Monolog\\Logger::DEBUG : \\Monolog\\Logger::INFO \/\/\u51fa\u529b\u30ec\u30d9\u30eb\u5236\u5fa1\u306e\u305f\u3081\u8ffd\u52a0\n                    )\n                )\n            )\n        );\n\n        \/\/app.debug\u304ctrue\u306e\u5834\u5408\u30af\u30a8\u30ea\u3092\u30ed\u30b0\u306b\u51fa\u529b\u3059\u308b\u3002\n        if(\\Config::get('app.debug')) {\n            \\DB::listen(function($query, $bindings, $time){\n                \\Log::debug('QUERY:[' . $query . '] BINDINGS:' \n                        . json_encode($bindings), ['TIME' => $time]);\n            });\n        }\n    }\n\/\/ \u4ee5\u4e0b\u7565\n<\/pre>\n<p>\u51fa\u529b\u30ec\u30d9\u30eb\u306f\u30ed\u30ae\u30f3\u30b0\u30cf\u30f3\u30c9\u30e9\u5074\u306b\u8a2d\u5b9a\u304c\u3042\u3063\u305f\u3093\u3067\u3059\u306d\u3002\u524d\u56de\u306f\u672a\u6307\u5b9a\u3060\u3063\u305f\u306e\u3067\u5168\u30ec\u30d9\u30eb\u304c\u51fa\u529b\u3055\u308c\u308b\u72b6\u614b\u3067\u3057\u305f\u3002<br \/>\napp.debug\u3067\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u3059\u308b\u3053\u3068\u306b\u3057\u30663\u9805\u6f14\u7b97\u5b50\u3067app.debug\u304c\u6709\u52b9\u306a\u5834\u5408\u306fDEBUG\u3001\u7121\u52b9\u306a\u5834\u5408\u306fINFO\u3092\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u3082\u3046\u4e00\u3064\u306e\u30af\u30a8\u30ea\u51fa\u529b\u306b\u3064\u3044\u3066\u306flogger\u3068\u306f\u5225\u306e\u8a71\u3067\u3059\u304c\u3001\u8a2d\u5b9a\u3057\u305f\u5834\u6240\u3082\u8fd1\u3044\u3067\u3059\u3057\u3064\u3044\u3067\u306b\u7d39\u4ecb\u3002<br \/>\n\u5b9f\u884c\u3055\u308c\u305f\u30af\u30a8\u30ea\u3092\u898b\u306a\u3044\u3068\u4e0d\u5b89\u306b\u306a\u308b\u306e\u3067\u78ba\u8a8d\u65b9\u6cd5\u306f\u5fc5\u9808\u3067\u3059\u304c\u3001\u30c7\u30d0\u30c3\u30b0\u72b6\u614b\u3067\u5e38\u306b\u51fa\u529b\u3055\u308c\u308b\u306e\u306f\u904e\u5270\u306a\u611f\u3058\u3082\u3057\u3066\u3044\u307e\u3059\u3002\u898b\u3048\u306a\u3044\u3088\u308a\u306f\u3044\u3044\u304b\u306a\u3002<\/p>\n<a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-facebook nolightbox\" data-provider=\"facebook\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Facebook\" href=\"https:\/\/www.facebook.com\/sharer.php?u=https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F4398&#038;t=Laravel%205.1%20%E3%81%A7%E3%83%AD%E3%82%B0%E5%87%BA%E5%8A%9B%E3%80%81%E3%81%9D%E3%81%AE%E5%BE%8C%20%28%E5%87%BA%E5%8A%9B%E3%83%AC%E3%83%99%E3%83%AB%E8%A8%AD%E5%AE%9A%E3%80%81%E3%82%AF%E3%82%A8%E3%83%AA%E5%87%BA%E5%8A%9B%29&#038;s=100&#038;p&#091;url&#093;=https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F4398&#038;p&#091;images&#093;&#091;0&#093;=&#038;p&#091;title&#093;=Laravel%205.1%20%E3%81%A7%E3%83%AD%E3%82%B0%E5%87%BA%E5%8A%9B%E3%80%81%E3%81%9D%E3%81%AE%E5%BE%8C%20%28%E5%87%BA%E5%8A%9B%E3%83%AC%E3%83%99%E3%83%AB%E8%A8%AD%E5%AE%9A%E3%80%81%E3%82%AF%E3%82%A8%E3%83%AA%E5%87%BA%E5%8A%9B%29\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"Facebook\" title=\"Share on Facebook\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/www.lancard.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/facebook.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-twitter nolightbox\" data-provider=\"twitter\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Twitter\" href=\"http:\/\/twitter.com\/share?url=https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F4398&#038;text=Laravel%205.1%20%E3%81%A7%E3%83%AD%E3%82%B0%E5%87%BA%E5%8A%9B%E3%80%81%E3%81%9D%E3%81%AE%E5%BE%8C%20%28%E5%87%BA%E5%8A%9B%E3%83%AC%E3%83%99%E3%83%AB%E8%A8%AD%E5%AE%9A%E3%80%81%E3%82%AF%E3%82%A8%E3%83%AA%E5%87%BA%E5%8A%9B%29\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"twitter\" title=\"Share on Twitter\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/www.lancard.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/twitter.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-linkedin nolightbox\" data-provider=\"linkedin\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Linkedin\" href=\"https:\/\/www.linkedin.com\/shareArticle?mini=true&#038;url=https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F4398&#038;title=Laravel%205.1%20%E3%81%A7%E3%83%AD%E3%82%B0%E5%87%BA%E5%8A%9B%E3%80%81%E3%81%9D%E3%81%AE%E5%BE%8C%20%28%E5%87%BA%E5%8A%9B%E3%83%AC%E3%83%99%E3%83%AB%E8%A8%AD%E5%AE%9A%E3%80%81%E3%82%AF%E3%82%A8%E3%83%AA%E5%87%BA%E5%8A%9B%29\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"linkedin\" title=\"Share on Linkedin\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/www.lancard.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/linkedin.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-tumblr nolightbox\" data-provider=\"tumblr\" target=\"_blank\" rel=\"nofollow\" title=\"Share on tumblr\" href=\"https:\/\/tumblr.com\/share?s=&#038;v=3&#038;t=Laravel%205.1%20%E3%81%A7%E3%83%AD%E3%82%B0%E5%87%BA%E5%8A%9B%E3%80%81%E3%81%9D%E3%81%AE%E5%BE%8C%20%28%E5%87%BA%E5%8A%9B%E3%83%AC%E3%83%99%E3%83%AB%E8%A8%AD%E5%AE%9A%E3%80%81%E3%82%AF%E3%82%A8%E3%83%AA%E5%87%BA%E5%8A%9B%29&#038;u=https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F4398\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"tumblr\" title=\"Share on tumblr\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/www.lancard.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/tumblr.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-mail nolightbox\" data-provider=\"mail\" rel=\"nofollow\" title=\"Share by email\" href=\"mailto:?subject=Laravel%205.1%20%E3%81%A7%E3%83%AD%E3%82%B0%E5%87%BA%E5%8A%9B%E3%80%81%E3%81%9D%E3%81%AE%E5%BE%8C%20%28%E5%87%BA%E5%8A%9B%E3%83%AC%E3%83%99%E3%83%AB%E8%A8%AD%E5%AE%9A%E3%80%81%E3%82%AF%E3%82%A8%E3%83%AA%E5%87%BA%E5%8A%9B%29&#038;body=%E3%82%B7%E3%82%A7%E3%82%A2%E3%81%99%E3%82%8B%EF%BC%9A:%20https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F4398\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"mail\" title=\"Share by email\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/www.lancard.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/mail.png\" \/><\/a>","protected":false},"excerpt":{"rendered":"<p>2017\/2\/1 \u4e0d\u5177\u5408\u304c\u3042\u3063\u305f\u306e\u3067\u300eLaravel 5.1 \u3067\u30ed\u30b0\u51fa\u529b\u3001\u305d\u308c\u304b\u3089 (\u30ed\u30b0\u30e1\u30fc\u30eb\u30c9\u30e9\u30a4\u30d0\u30fc\u52d5\u4f5c\u4e0d\u826f\u5bfe\u51e6\u3001\u30af\u30a8\u30ea\u51fa\u529b\u306e\u8abf\u6574)\u300f\u306e\u307b\u3046\u3092\u898b\u3066\u4e0b\u3055\u3044 \u5c11\u3057\u524d\u306b\u66f8\u3044\u305f\u300eLaravel 5.1 \u3067\u5b9f\u884c\u30e6\u30fc\u30b6\u30fc\u6bce\u306b\u30ed [&hellip;]<\/p>\n","protected":false},"author":12,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[130],"class_list":["post-4398","post","type-post","status-publish","format-standard","hentry","category-php","tag-laravel"],"_links":{"self":[{"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/posts\/4398","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/comments?post=4398"}],"version-history":[{"count":13,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/posts\/4398\/revisions"}],"predecessor-version":[{"id":4700,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/posts\/4398\/revisions\/4700"}],"wp:attachment":[{"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/media?parent=4398"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/categories?post=4398"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/tags?post=4398"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}