{"id":348,"date":"2018-03-05T19:00:21","date_gmt":"2018-03-05T10:00:21","guid":{"rendered":"https:\/\/blog.capilano-fw.com\/?p=348"},"modified":"2018-03-05T19:01:32","modified_gmt":"2018-03-05T10:01:32","slug":"%ef%bc%95%e5%88%86%e3%81%a7%e5%ae%8c%e4%ba%86%ef%bc%81%e9%81%8e%e5%8e%bb%e3%81%ae%e6%b5%81%e5%87%ba%e3%83%91%e3%82%b9%e3%83%af%e3%83%bc%e3%83%89%e5%85%a5%e5%8a%9b%e3%82%92%e9%98%b2%e3%81%90laravel","status":"publish","type":"post","link":"https:\/\/blog.capilano-fw.com\/?p=348","title":{"rendered":"\uff15\u5206\u3067\u5b8c\u4e86\uff01\u904e\u53bb\u306e\u6d41\u51fa\u30d1\u30b9\u30ef\u30fc\u30c9\u5165\u529b\u3092\u9632\u3050Laravel\u30d1\u30c3\u30b1\u30fc\u30b8"},"content":{"rendered":"<p>\u524d\u56de\u3001<a href=\"https:\/\/blog.capilano-fw.com\/?p=341\">\u516853\u7a2e\u985e\uff01Laravel 5.6\u306e\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u5b9f\u4f8b<\/a>\u3068\u3044\u3046\u8a18\u4e8b\u3092\u516c\u958b\u3057\u305f\u306e\u3067\u3059\u304c\u3001\u305d\u306e\u95a2\u4fc2\u3067\u3001\u3072\u3068\u3064\u6c17\u306b\u306a\u308b\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u767a\u898b\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u305d\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u306f\u3001<\/p>\n<p><strong style=\"font-size: 35px;\">\u904e\u53bb\u306e\u6d41\u51fa\u30d1\u30b9\u30ef\u30fc\u30c9\u3068\u4e00\u81f4\u3057\u3066\u3044\u308b\u304b\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b<\/strong><\/p>\n<p>\u3068\u3044\u3046\u3082\u306e\u3067\u3059\u3002<\/p>\n<p>\u3064\u307e\u308a\u3001yahoo.com\u3060\u3063\u305f\u308a\u3001\u30a2\u30b7\u30e5\u30ec\u30a4\u30fb\u30de\u30c7\u30a3\u30bd\u30f3\uff08\u4e0d\u502b\u3092\u63a8\u5968\u3059\u308b\u30b5\u30a4\u30c8\uff09\u304c\u30cf\u30c3\u30ad\u30f3\u30b0\u3092\u53d7\u3051\u3066\u6570\u591a\u304f\u306e\u500b\u4eba\u30c7\u30fc\u30bf\u304c\u6d41\u51fa\u3057\u305f\u308f\u3051\u3067\u3059\u3051\u3069\u3001\u305d\u3046\u3044\u3063\u305f\u6d41\u51fa\u30c7\u30fc\u30bf\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u5316\u3057\u3066\u3044\u308b<a href=\"https:\/\/haveibeenpwned.com\/\">&#8216;;&#8211;have i been pwned?<\/a>\u3068\u3044\u3046\u30b5\u30a4\u30c8\u3092\u901a\u3057\u3066\u3001\u5165\u529b\u30d1\u30b9\u30ef\u30fc\u30c9\u304c\u5b89\u5168\u304b\u30c1\u30a7\u30c3\u30af\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u305d\u306e\u305f\u3081\u3001<strong>\u3088\u308a\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u306b\u914d\u616e\u3057\u305f\u30b5\u30a4\u30c8\u69cb\u6210\u3092\u8003\u3048\u3066\u3044\u308b\u5834\u5408\u306f\u3001\u3053\u3046\u3044\u3063\u305f\u30d1\u30c3\u30b1\u30fc\u30b8\u3067\u72ec\u81ea\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u3092\u8ffd\u52a0\u3057\u3066\u304a\u304f\u3053\u3068\u3092\u304a\u3059\u3059\u3081\u3057\u307e\u3059\u3002<\/strong><\/p>\n<h1>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u65b9\u6cd5<\/h1>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u3044\u3064\u3082\u306e\u3054\u3068\u304fcomposer\u3067\u4e00\u767a\u3067OK\u3067\u3059\u3002<\/p>\n<pre><strong>composer require valorin\/pwned-validator<\/strong><\/pre>\n<p>\u3082\u3057\u3001auto-discovery\u304c\u3042\u308b\u306a\u3089\uff08Laravel 5.5\u4ee5\u4e0a\uff09\u3001\u3053\u308c\u3060\u3051\u3067\u5b8c\u4e86\u3067\u3059\u3002<\/p>\n<p>\u6b21\u306b\u3001\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u306b\u5931\u6557\u3057\u305f\u6642\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u767b\u9332\u3057\u307e\u3057\u3087\u3046\u3002<br \/>\n\u65e5\u672c\u8a9e\u306e\u5834\u5408\u306f\u3001<strong>\/resources\/lang\/ja\/validation.php<\/strong> \u3067\u3059\u3002<\/p>\n<p>\u6b21\u306e\u30b3\u30fc\u30c9\u3092\u3001\u914d\u5217\u5185\u306b\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre>\/*  \u7701\u7565  *\/\r\n\r\n<strong>'pwned' =&gt; '\u3053\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u306f\u3001\u904e\u53bb\u306e\u6d41\u51fa\u3067\u78ba\u8a8d\u3055\u308c\u305f\u3082\u306e\u3068\u4e00\u81f4\u3057\u3066\u3044\u307e\u3059\u3002\u4ed6\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u3078\u5909\u66f4\u3057\u3066\u304f\u3060\u3055\u3044\u3002',<\/strong>\r\n\r\n\/*  \u7701\u7565  *\/<\/pre>\n<h1>\u4f7f\u3044\u65b9<\/h1>\n<p>\u4f7f\u3044\u65b9\u3082\u901a\u5e38\u306e\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u3068\u540c\u3058\u3067\u554f\u984c\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<pre>$input = ['password' =&gt; 'xxxxxxxx'];\r\n$rules = ['password' =&gt; '<strong>pwned<\/strong>'];\r\n$validator = Validator::make($input, $rules);\r\n\r\nif($validator-&gt;fails()) {\r\n\r\n    $errors = $validator-&gt;messages()-&gt;toArray();\r\n    echo $errors['password'][0]; \/\/ \u3053\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u306f\u3001\u904e\u53bb\u306e\u6d41\u51fa\u3067\u78ba\u8a8d\u3055\u308c\u305f\u3082\u306e\u3068\u4e00\u81f4\u3057\u3066\u3044\u307e\u3059\u3002\u4ed6\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u3078\u5909\u66f4\u3057\u3066\u304f\u3060\u3055\u3044\u3002\r\n\r\n}<\/pre>\n<p>\u203b\u3053\u306e\u4f8b\u306f\u30c6\u30b9\u30c8\u306e\u305f\u3081\u3001\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u3057\u3066\u3059\u3050\u30a8\u30e9\u30fc\u8868\u793a\u3057\u3066\u307e\u3059\u3051\u3069\u3001\u901a\u5e38\u306f\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3084JSON\u306a\u3069\u3067\u30c7\u30fc\u30bf\u3092\u53d7\u3051\u53d6\u3063\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h1>\u3061\u306a\u307f\u306b<\/h1>\n<p><strong>pwned<\/strong>\u3068\u3044\u3046\u306e\u306f\u3001<strong>owned\uff08\u6240\u6709\u3055\u308c\u3066\u3044\u308b\uff09<\/strong>\u3068\u540c\u3058\u3082\u306e\u3067\u30cd\u30c3\u30c8\u30b9\u30e9\u30f3\u30b0\u306a\u3093\u3060\u305d\u3046\u3067\u3059\u3002\u300cp\u300d\u3068\u300co\u300d\u306f\u30ad\u30fc\u30dc\u30fc\u30c9\u3067\u3068\u306a\u308a\u306b\u3042\u308b\u306e\u3067\u3001\u3088\u304f\u30df\u30b9\u30bf\u30a4\u30d7\u3059\u308b\u304b\u3089\u306a\u3093\u3067\u3059\u306d\u3002<br \/>\n\u4eca\u56de\u521d\u3081\u3066\u77e5\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u3088\u308a\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u3092\u3088\u308a\u5b89\u5168\u306b\u3059\u308b\u305f\u3081\u306b\u4e00\u5ea6\u691c\u8a0e\u3057\u3066\u307f\u3066\u306f\u3044\u304b\u304c\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n<p>\u3067\u306f\u3067\u306f\u301c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u56de\u3001\u516853\u7a2e\u985e\uff01Laravel 5.6\u306e\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u5b9f\u4f8b\u3068\u3044\u3046\u8a18\u4e8b\u3092\u516c\u958b\u3057\u305f\u306e\u3067\u3059\u304c\u3001\u305d\u306e\u95a2\u4fc2\u3067\u3001\u3072\u3068\u3064\u6c17\u306b\u306a\u308b\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u767a\u898b\u3057\u307e\u3057\u305f\u3002 \u305d\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u306f &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.capilano-fw.com\/?p=348\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;\uff15\u5206\u3067\u5b8c\u4e86\uff01\u904e\u53bb\u306e\u6d41\u51fa\u30d1\u30b9\u30ef\u30fc\u30c9\u5165\u529b\u3092\u9632\u3050Laravel\u30d1\u30c3\u30b1\u30fc\u30b8&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":350,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[47],"class_list":["post-348","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-laravel","tag-47"],"_links":{"self":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/348","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=348"}],"version-history":[{"count":2,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/348\/revisions"}],"predecessor-version":[{"id":351,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/348\/revisions\/351"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/media\/350"}],"wp:attachment":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=348"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=348"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=348"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}