

{"id":1515,"date":"2020-07-08T00:18:21","date_gmt":"2020-07-07T15:18:21","guid":{"rendered":"https:\/\/curecode.jp\/tech\/?p=1515"},"modified":"2020-07-08T00:22:37","modified_gmt":"2020-07-07T15:22:37","slug":"laravel-change-password-reset-validation-message","status":"publish","type":"post","link":"https:\/\/curecode.jp\/tech\/laravel-change-password-reset-validation-message\/","title":{"rendered":"Laravel \u3067\u30d1\u30b9\u30ef\u30fc\u30c9\u30ea\u30bb\u30c3\u30c8\u30e1\u30fc\u30eb\u306e\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u8868\u793a\u3057\u306a\u3044\u3088\u3046\u306b\u3059\u308b"},"content":{"rendered":"<p>\n  Laravel 6.x \u3067 <a href=\"https:\/\/readouble.com\/laravel\/6.x\/ja\/authentication.html\" rel=\"noopener noreferrer\" target=\"_blank\">laravel\/ui \u306e\u8a8d\u8a3c\u6a5f\u80fd<\/a>\u3092\u5c0e\u5165\u3059\u308b\u3068\u3001\u30e6\u30fc\u30b6\u30fc\u767b\u9332\u3084\u30d1\u30b9\u30ef\u30fc\u30c9\u518d\u8a2d\u5b9a\u306e\u6a5f\u80fd\u304c\u81ea\u52d5\u3067\u3064\u3044\u3066\u304d\u307e\u3059\u3088\u306d\u3002\u4fbf\u5229\u306a\u306e\u3067\u305d\u306e\u307e\u307e\u4f7f\u3063\u3066\u3044\u308b\u3068\u3044\u3046\u30b1\u30fc\u30b9\u3082\u3042\u308b\u3068\u601d\u3044\u307e\u3059\u3002\n<\/p>\n<p>\n Laravel \u306e\u516c\u5f0f\u3067\u3082\u3001\u3053\u306e\u6a5f\u80fd\u306e\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u7b49\u306e<a href=\"https:\/\/readouble.com\/laravel\/6.x\/ja\/auth-php.html\" rel=\"noopener noreferrer\" target=\"_blank\">\u65e5\u672c\u8a9e\u8a33\u306e\u8a00\u8a9e\u30d5\u30a1\u30a4\u30eb<\/a>\u3082\u7528\u610f\u3055\u308c\u3066\u3044\u307e\u3059\u3002\n<\/p>\n<h3>\u554f\u984c\u70b9<\/h3>\n<p>\n \u3057\u304b\u3057\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u30ea\u30bb\u30c3\u30c8\u6642\u306b\u304a\u3051\u308b\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u306f\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u4e0a\u3088\u304f\u3042\u308a\u307e\u305b\u3093\u3002\n<\/p>\n<figure>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/curecode.jp\/tech\/wp-content\/uploads\/2020\/07\/password_reset_validation_message.png\" alt=\"\u300c\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u306b\u4e00\u81f4\u3059\u308b\u30e6\u30fc\u30b6\u30fc\u306f\u5b58\u5728\u3057\u307e\u305b\u3093\u3002\u300d\u306e\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u30a8\u30e9\u30fc\u304c\u51fa\u3066\u3057\u307e\u3046\u3002\" width=\"547\" height=\"80\" class=\"aligncenter size-full wp-image-1516\" srcset=\"https:\/\/curecode.jp\/tech\/wp-content\/uploads\/2020\/07\/password_reset_validation_message.png 547w, https:\/\/curecode.jp\/tech\/wp-content\/uploads\/2020\/07\/password_reset_validation_message-300x44.png 300w, https:\/\/curecode.jp\/tech\/wp-content\/uploads\/2020\/07\/password_reset_validation_message-200x29.png 200w\" sizes=\"auto, (max-width: 547px) 100vw, 547px\" \/><br \/>\n<\/figure>\n<p>\n  \u5b58\u5728\u3057\u306a\u3044\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3092\u5165\u529b\u3057\u3066\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u518d\u8a2d\u5b9a\u3057\u3088\u3046\u3068\u3059\u308b\u3068\u3001\u300c\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u306b\u4e00\u81f4\u3059\u308b\u30e6\u30fc\u30b6\u30fc\u306f\u5b58\u5728\u3057\u307e\u305b\u3093\u3002\u300d\u3068\u3044\u3063\u305f\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002\n<\/p>\n<p>\n  \u4e00\u898b\u89aa\u5207\u306a\u3088\u3046\u3067\u3059\u304c\u3001\u3053\u3053\u306b\u554f\u984c\u304c\u3042\u308a\u307e\u3059\u3002\u7279\u5b9a\u306e\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u306b\u3064\u3044\u3066\u767b\u9332\u3055\u308c\u3066\u3044\u308b\u304b\u3055\u308c\u3066\u3044\u306a\u3044\u304b\u3092\u3001\u7b2c\u4e09\u8005\u304c\u77e5\u308b\u3053\u3068\u304c\u3067\u304d\u3066\u3057\u307e\u3044\u307e\u3059\u3002\n<\/p>\n<p>\n  \u7b2c\u4e09\u8005\u306b\u77e5\u3089\u308c\u306a\u3044\u3088\u3046\u306b\u3059\u308b\u306b\u306f\u3001\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u304c\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u5b58\u5728\u3057\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u3092\u6b63\u76f4\u306b\u8868\u793a\u3057\u3066\u306f\u3044\u3051\u306a\u3044\u306e\u3067\u3059\u3002<br \/>\n<\/P><\/p>\n<h3>\u5bfe\u7b56<\/h3>\n<p>\n  \u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u306e\u5f62\u5f0f\u306e\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u3092\u901a\u904e\u3057\u305f\u3068\u304d\u306f\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u767b\u9332\u306e\u6709\u7121\u306b\u304b\u304b\u308f\u3089\u305a\u3001\u300c\u30d1\u30b9\u30ef\u30fc\u30c9\u30ea\u30bb\u30c3\u30c8\u306e\u30e1\u30fc\u30eb\u3092\u9001\u4fe1\u3057\u307e\u3057\u305f\u3002\u300d\u3068\u6b63\u5e38\u7cfb\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u8868\u793a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3082\u3061\u308d\u3093\u305d\u306e\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u304c\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u5b58\u5728\u3059\u308b\u5834\u5408\u306f\u30e1\u30fc\u30eb\u3092\u9001\u4fe1\u3057\u3001\u5b58\u5728\u3057\u306a\u3044\u5834\u5408\u306f\u5b9f\u969b\u306b\u306f\u30e1\u30fc\u30eb\u306f\u9001\u308a\u307e\u305b\u3093\u3002\n<\/p>\n<p>\n  Laravel \u3067\u306f\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u518d\u8a2d\u5b9a\u306e\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3067\u3042\u308b <code>App\\Http\\Controllers\\Auth\\ForgotPasswordController<\/code> \u3067 <code>SendsPasswordResetEmails<\/code> \u30c8\u30ec\u30a4\u30c8\u3067\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u308b <code>sendResetLinkFailedResponse<\/code> \u30e1\u30bd\u30c3\u30c9\u3092\u4e0a\u66f8\u304d\u3057\u3066\u3084\u308a\u307e\u3059\u3002\n<\/p>\n<pre><code class=\"php\">\r\nuse App\\Http\\Controllers\\Controller;\r\nuse Illuminate\\Foundation\\Auth\\SendsPasswordResetEmails;\r\nuse Illuminate\\Http\\Request; \/\/ \u8ffd\u52a0\r\n\r\nclass ForgotPasswordController extends Controller\r\n{\r\n    ....\r\n\r\n    \/**\r\n     * SendsPasswordResetEmails trait \u3067\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u308b\u30e1\u30bd\u30c3\u30c9\u3092\u4e0a\u66f8\u304d\u3057\u3066\r\n     * \u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u304c\u5b58\u5728\u3057\u306a\u3044\u5834\u5408\u3067\u3082 error message \u3092\u8868\u793a\u3057\u306a\u3044\u3002\r\n     *\r\n     * @param  \\Illuminate\\Http\\Request  $request\r\n     * @param  string  $response\r\n     * @return \\Illuminate\\Http\\RedirectResponse|\\Illuminate\\Http\\JsonResponse\r\n     *\/\r\n    protected function sendResetLinkFailedResponse(Request $request, $response)\r\n    {\r\n        \/\/ \u3082\u3068\u3082\u3068\u306f\u3053\u3061\u3089\u306e\u51e6\u7406\r\n        \/\/return back()\r\n        \/\/        ->withInput($request->only('email'))\r\n        \/\/        ->withErrors(['email' => trans($response)]);\r\n        \/\/ \u30ec\u30b9\u30dd\u30f3\u30b9\u3092\u6210\u529f\u3057\u305f\u3068\u304d\u3068\u540c\u69d8\u306e\u51e6\u7406\u306b\u66f8\u304d\u63db\u3048\u308b\u3002\r\n        $response = 'passwords.sent';\r\n        \/\/ \u6210\u529f\u6642\u3068\u540c\u3058\u3088\u3046\u306b\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u30a8\u30e9\u30fc\u306f\u51fa\u3055\u306a\u3044\u3067\u623b\u3059\r\n        return back()->with('status', trans($response));\r\n    }\r\n}\r\n<\/code><\/pre>\n<p>\n  \u3053\u308c\u3067\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u518d\u8a2d\u5b9a\u306e\u3068\u304d\u306b\u3001\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u306f\u8868\u793a\u3055\u308c\u306a\u304f\u306a\u308a\u307e\u3059\u3002\n<\/p>\n<h3>\u7ffb\u8a33\u306e\u30ab\u30b9\u30bf\u30de\u30a4\u30ba<\/h3>\n<p>\n  \u3042\u308f\u305b\u3066 <code>resources\/lang\/ja\/passwords.php<\/code> \u3092\u5909\u66f4\u3057\u3066\u3001\u89aa\u5207\u306a\u30e1\u30c3\u30bb\u30fc\u30b8\u306b\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3057\u3066\u304a\u304d\u307e\u3059\u3002\n<\/p>\n<pre><code class=\"php\">\r\n    \/\/ 'sent' => '\u30d1\u30b9\u30ef\u30fc\u30c9\u30ea\u30bb\u30c3\u30c8\u30e1\u30fc\u30eb\u3092\u9001\u4fe1\u3057\u307e\u3057\u305f\u3002\r\n    'sent' => '\u30d1\u30b9\u30ef\u30fc\u30c9\u30ea\u30bb\u30c3\u30c8\u30e1\u30fc\u30eb\u3092\u9001\u4fe1\u3057\u307e\u3057\u305f\u300230\u5206\u7d4c\u3063\u3066\u3082\u30e1\u30fc\u30eb\u304c\u5c4a\u304b\u306a\u3044\u5834\u5408\u306f\u3001\u5165\u529b\u3055\u308c\u305f\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u304c\u9593\u9055\u3063\u3066\u3044\u308b\u304b\u3001\u8ff7\u60d1\u30e1\u30fc\u30eb\u30d5\u30a9\u30eb\u30c0\u306b\u5165\u3063\u3066\u3044\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u306e\u3067\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002',\r\n<\/code><\/pre>\n<figure>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/curecode.jp\/tech\/wp-content\/uploads\/2020\/07\/password_reset_mail_sent_message.png\" alt=\"\u30d1\u30b9\u30ef\u30fc\u30c9\u30ea\u30bb\u30c3\u30c8\u30e1\u30fc\u30eb\u3092\u9001\u4fe1\u3057\u307e\u3057\u305f\u300230\u5206\u7d4c\u3063\u3066\u3082\u30e1\u30fc\u30eb\u304c\u5c4a\u304b\u306a\u3044\u5834\u5408\u306f\u3001\u5165\u529b\u3055\u308c\u305f\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u304c\u9593\u9055\u3063\u3066\u3044\u308b\u304b\u3001\u8ff7\u60d1\u30e1\u30fc\u30eb\u30d5\u30a9\u30eb\u30c0\u306b\u5165\u3063\u3066\u3044\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u306e\u3067\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002\" width=\"809\" height=\"92\" class=\"aligncenter size-full wp-image-1518\" srcset=\"https:\/\/curecode.jp\/tech\/wp-content\/uploads\/2020\/07\/password_reset_mail_sent_message.png 809w, https:\/\/curecode.jp\/tech\/wp-content\/uploads\/2020\/07\/password_reset_mail_sent_message-300x34.png 300w, https:\/\/curecode.jp\/tech\/wp-content\/uploads\/2020\/07\/password_reset_mail_sent_message-768x87.png 768w, https:\/\/curecode.jp\/tech\/wp-content\/uploads\/2020\/07\/password_reset_mail_sent_message-200x23.png 200w\" sizes=\"auto, (max-width: 809px) 100vw, 809px\" \/><br \/>\n<\/figure>\n<p>\n  \u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3092\u6253\u3061\u9593\u9055\u3048\u305f\u306a\u3069\u3001\u30e1\u30fc\u30eb\u304c\u5c4a\u304b\u306a\u3044\u5834\u5408\u306e\u30d5\u30a9\u30ed\u30fc\u306b\u3082\u306a\u308a\u307e\u3059\u3002\n<\/p>\n<h3>IT\u30a8\u30f3\u30b8\u30cb\u30a2\u52df\u96c6\u4e2d\uff01<\/h3>\n<p>\u30ad\u30e5\u30a2\u30b3\u30fc\u30c9\u682a\u5f0f\u4f1a\u793e\u306fIT\u30a8\u30f3\u30b8\u30cb\u30a2\u3092\u52df\u96c6\u3057\u3066\u304a\u308a\u307e\u3059\u3002\u5c11\u4eba\u6570\u306e\u8077\u5834\u306a\u306e\u3067\u3001\u4e0a\u6d41\u30fb\u4e0b\u6d41\u3084\u30b5\u30fc\u30d0\u30fc\u30fb\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u5bfe\u5fdc\u306e\u57a3\u6839\u306a\u304f\u3001\u3042\u306a\u305f\u306e\u5f37\u307f\u3092\u6d3b\u304b\u3057\u306a\u304c\u3089 \u3044\u308d\u3044\u308d\u306a\u3053\u3068\u306b\u30c1\u30e3\u30ec\u30f3\u30b8\u53ef\u80fd\u3067\u3059\u3002\u30a8\u30f3\u30b8\u30cb\u30a2\u3068\u3057\u3066\u306e\u672a\u7d4c\u9a13\u306e\u65b9\u3001\u7d4c\u9a13\u304c\u5c11\u306a\u3044\u65b9\u3082\u6b53\u8fce\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u4e0b\u8a18\u3088\u308aIT\u30a8\u30f3\u30b8\u30cb\u30a2\u52df\u96c6\u306e\u63a1\u7528\u60c5\u5831\u3092\u3054\u89a7\u3044\u305f\u3060\u3051\u307e\u3059\u3002<\/p>\n<div class=\"curecode_recruit_bn\">\n\t\t\t\t<a href=\"https:\/\/curecode.jp\/recruit\/itengineer\/\" target=\"_blank\" rel=\"noopener noreferrer\"><br \/>\n\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/curecode.jp\/tech\/wp-content\/themes\/tech\/images\/it_recruit.png?20241220\" alt=\"\u4e8b\u696d\u62e1\u5927\u306b\u4f34\u3044\u65b0\u3057\u3044\u9818\u57df\u306b\u4e00\u7dd2\u306b\u53d6\u308a\u7d44\u3093\u3067\u3044\u304f\u30e1\u30f3\u30d0\u30fc\u3092\u52df\u96c6\u3057\u307e\u3059\u3002\"  width=\"500\" height=\"180\"\/><br \/>\n\t\t\t\t<\/a>\n\t\t<\/div>\n<h3>\u30ad\u30e5\u30a2\u30b3\u30fc\u30c9\u516c\u5f0f\u30a4\u30f3\u30b9\u30bf\u30b0\u30e9\u30e0<\/h3>\n<p>\u30ad\u30e5\u30a2\u30b3\u30fc\u30c9\u682a\u5f0f\u4f1a\u793e\u306e\u65b0\u30b5\u30fc\u30d3\u30b9\u60c5\u5831\u3084\u3001\u30aa\u30d5\u30a3\u30b9\u30e9\u30a4\u30d5\u306e\u7d20\u6575\u306a\u77ac\u9593\u307e\u3067\u3002\u79c1\u305f\u3061\u306e\u65e5\u3005\u306e\u55b6\u307f\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<div class=\"curecode_recruit_bn\">\n\t\t\t\t<a href=\"https:\/\/www.instagram.com\/curecode\/\" target=\"_blank\" rel=\"noopener noreferrer\"><br \/>\n\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/curecode.jp\/tech\/wp-content\/themes\/tech\/images\/insta_bn.png?20241220\" alt=\"\u4e8b\u696d\u62e1\u5927\u306b\u4f34\u3044\u65b0\u3057\u3044\u9818\u57df\u306b\u4e00\u7dd2\u306b\u53d6\u308a\u7d44\u3093\u3067\u3044\u304f\u30e1\u30f3\u30d0\u30fc\u3092\u52df\u96c6\u3057\u307e\u3059\u3002\"  width=\"500\" height=\"180\"\/><br \/>\n\t\t\t\t<\/a>\n\t\t<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Laravel 6.x \u3067 laravel\/ui \u306e\u8a8d\u8a3c\u6a5f\u80fd\u3092\u5c0e\u5165\u3059\u308b\u3068\u3001\u30e6\u30fc\u30b6\u30fc\u767b\u9332\u3084\u30d1\u30b9\u30ef\u30fc\u30c9\u518d [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1161,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[167],"tags":[162,169,170],"class_list":["post-1515","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php","tag-laravel","tag-password","tag-secuity"],"_links":{"self":[{"href":"https:\/\/curecode.jp\/tech\/wp-json\/wp\/v2\/posts\/1515","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/curecode.jp\/tech\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/curecode.jp\/tech\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/curecode.jp\/tech\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/curecode.jp\/tech\/wp-json\/wp\/v2\/comments?post=1515"}],"version-history":[{"count":7,"href":"https:\/\/curecode.jp\/tech\/wp-json\/wp\/v2\/posts\/1515\/revisions"}],"predecessor-version":[{"id":1524,"href":"https:\/\/curecode.jp\/tech\/wp-json\/wp\/v2\/posts\/1515\/revisions\/1524"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/curecode.jp\/tech\/wp-json\/wp\/v2\/media\/1161"}],"wp:attachment":[{"href":"https:\/\/curecode.jp\/tech\/wp-json\/wp\/v2\/media?parent=1515"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/curecode.jp\/tech\/wp-json\/wp\/v2\/categories?post=1515"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/curecode.jp\/tech\/wp-json\/wp\/v2\/tags?post=1515"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}