{"id":289,"date":"2018-02-18T03:14:26","date_gmt":"2018-02-17T18:14:26","guid":{"rendered":"https:\/\/blog.capilano-fw.com\/?p=289"},"modified":"2019-09-04T18:47:26","modified_gmt":"2019-09-04T09:47:26","slug":"%e3%80%90laravel5-6%e3%80%91%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab%e7%9b%b4%e5%be%8c%e3%81%ab%e3%82%84%e3%82%8b%e3%81%93%e3%81%a8%ef%bc%93%e7%82%b9","status":"publish","type":"post","link":"https:\/\/blog.capilano-fw.com\/?p=289","title":{"rendered":"\u3010Laravel5.6\u3011\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u76f4\u5f8c\u306b\u3084\u308b\u3053\u3068\uff13\u70b9"},"content":{"rendered":"<p>\u3055\u3066\u3001Laravel5.6\u304c\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u3066\u5c11\u3057\u7d4c\u3061\u307e\u3057\u305f\u3002<br \/>\n\u904b\u304c\u3044\u3044\u3053\u3068\u306b\u3001\u3042\u308b\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u69d8\u304b\u3089\u6700\u65b0\u74b0\u5883\u3067\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u3092\u69cb\u7bc9\u3057\u305f\u3044\u3068\u306e\u3054\u4f9d\u983c\u3092\u3044\u305f\u3060\u3044\u305f\u305f\u3081\u3001\u307e\u3055\u306b\u4ecaLaravel5.6\u3092\u4f7f\u3063\u3066\u958b\u767a\u304c\u9032\u884c\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u500b\u4eba\u7684\u306bLaravel\u306f4.2\u304b\u3089\u5229\u7528\u3057\u3066\u308b\u3093\u3067\u3059\u3051\u3069\u3001\u305d\u3053\u304b\u3089\u8003\u3048\u308b\u3068\u5185\u5bb9\u304c\u69d8\u3005\u306b\u9032\u5316\u3057\u3066\u904e\u53bb\u30d0\u30fc\u30b8\u30e7\u30f3\u3068\u306f\u9055\u3044\u304c\u51fa\u3066\u304d\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u3053\u3067\uff01<br \/>\n\u4eca\u56de\u306f<strong>\u6700\u65b0\u30d0\u30fc\u30b8\u30e7\u30f3\u306eLaravel5.6<\/strong>\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u5f8c\u3059\u3050\u306b\u3084\u308b\u3079\u304d\u3053\u3068\u3092\u307e\u3068\u3081\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p>\u30b4\u30fc\u30eb\u3068\u3057\u3066\u306f\u3001<\/p>\n<ul>\n<li><strong>\u57fa\u672c\u7684\u306a\u8a2d\u5b9a<\/strong>\uff08DB\u3001\u30bf\u30a4\u30e0\u30be\u30fc\u30f3\u3001\u8a00\u8a9e\u306a\u3069\uff09<\/li>\n<li><strong>\u30e6\u30fc\u30b6\u30fc\u8a8d\u8a3c<\/strong>\uff08\u30ed\u30b0\u30a4\u30f3\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u30ea\u30de\u30a4\u30f3\u30c0\u30fc\u304c\u4f7f\u3048\u308b\u3001\u30c6\u30b9\u30c8\u30e6\u30fc\u30b6\u30fc\u3082\u8ffd\u52a0\uff09<\/li>\n<li><strong>\u65e5\u672c\u8a9e\u5316<\/strong><\/li>\n<\/ul>\n<p>\u306e\uff13\u3064\u3067\u3059\u3002<br \/>\n\u3067\u306f\u3001\u65e9\u901f\u307f\u3066\u3044\u304d\u307e\u3057\u3087\u3046\uff01<\/p>\n<h1>\u57fa\u672c\u7684\u306a\u8a2d\u5b9a<\/h1>\n<h2><strong>\uff11\uff0e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9<\/strong><\/h2>\n<p>mysql\u306a\u3069\u306b\u597d\u304d\u306a\u540d\u524d\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4f5c\u6210\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n\u203b\u7167\u5408\u9806\u5e8f\u306a\u3069\u8a73\u7d30\u306a\u8a2d\u5b9a\u3092\u3057\u305f\u3044\u5834\u5408\u306f<strong>config\/database.php<\/strong>\u5185\u3067\u8a2d\u5b9a\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2><strong>\uff12\uff0e.env<\/strong><\/h2>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u30d5\u30a9\u30eb\u30c0\u76f4\u4e0b\u306b\u3042\u308b<strong>\u300c.env\u300d<\/strong>\u306e\u4e2d\u3067\u306f\u8272\u3005\u3068\u8a2d\u5b9a\u3067\u304d\u307e\u3059\u3051\u3069\u3001\u57fa\u672c\u7684\u306a\u3082\u306e\u3060\u3051\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<ul>\n<li><strong>APP_NAME<\/strong>\u3000\u30fb\u30fb\u30fb\u3000\u30b5\u30a4\u30c8\u540d<\/li>\n<li><strong>APP_URL<\/strong>\u3000\u30fb\u30fb\u30fb\u3000\u30b5\u30a4\u30c8\u306eURL<\/li>\n<li><strong>DB_DATABASE<\/strong>\u3000\u30fb\u30fb\u30fb\u3000\uff11\uff0e\u3067\u4f5c\u6210\u3057\u305f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u540d<\/li>\n<li><strong>DB_USERNAME<\/strong>\u3000\u30fb\u30fb\u30fb\u3000\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30e6\u30fc\u30b6\u30fc\u540d<\/li>\n<li><strong>DB_PASSWORD<\/strong>\u3000\u30fb\u30fb\u30fb\u3000\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30d1\u30b9\u30ef\u30fc\u30c9<\/li>\n<\/ul>\n<p>\u3082\u3057\u30e1\u30fc\u30eb\u30b5\u30fc\u30d0\u30fc\u304c\u7a3c\u50cd\u3057\u3066\u308b\u306e\u306a\u3089\u3001\u300cMAIL_DRIVER\u300d\u3092<strong>\u300csendmail\u300d<\/strong>\u306a\u3069\u306b\u5909\u66f4\u3059\u308c\u3070\u3001\u30e1\u30fc\u30eb\u9001\u4fe1\u304c\u3067\u304d\u308b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u203b \u4e0a\u8a18\u306e\u6587\u7ae0\u306f\u3001\u3082\u3068\u3082\u3068\u306f\u300cmail\u300d\u3068\u3057\u3066\u3044\u307e\u3057\u305f\u304c\u3001\u73fe\u5728\u306f<code>sendmail<\/code>\u3068\u306a\u3063\u3061\u308b\u305f\u3081\u5909\u66f4\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u3061\u306a\u307f\u306b\u79c1\u306e\u5834\u5408\u306f<a href=\"https:\/\/mailcatcher.me\" target=\"_blank\" rel=\"noopener noreferrer\">mailcatcher<\/a>\u3092\u4f7f\u3063\u3066\u308b\u3093\u3067\u3001\u3053\u3093\u306a\u611f\u3058\u3067\u3059\u3002<\/p>\n<pre><strong>MAIL_DRIVER=smtp\r\nMAIL_HOST=127.0.0.1\r\nMAIL_PORT=1025\r\nMAIL_USERNAME=null\r\nMAIL_PASSWORD=null\r\nMAIL_ENCRYPTION=null<\/strong><\/pre>\n<h2><strong>\uff13\uff0eapp.php\u306e\u8a2d\u5b9a<\/strong><\/h2>\n<p><strong>config\/app.php<\/strong>\u3067\u306f\u3001\uff13\u30ab\u6240\u3067\u3059\u3002<\/p>\n<ul>\n<li><strong>timezone<\/strong>\u3000\u30fb\u30fb\u30fb\u3000\u30bf\u30a4\u30e0\u30be\u30fc\u30f3\u3002UTC\u304b\u3089<strong>Asia\/Tokyo<\/strong>\u306b\u5909\u66f4<\/li>\n<li><strong>locale<\/strong>\u3000\u30fb\u30fb\u30fb\u3000\u8a00\u8a9e\u3002en\u3092<strong>ja<\/strong>\u306b\u5909\u66f4<\/li>\n<li><strong>fallback_locale<\/strong>\u3000\u30fb\u30fb\u30fb\u3000<del>\u4e0a\u3068\u540c\u3058\u3002<\/del>\u3053\u3053\u306f\u8a72\u5f53\u8a00\u8a9e\u304c\u898b\u3064\u304b\u3089\u306a\u3044\u5834\u5408\u306e\u8a00\u8a9e\u3067\u3059\u3002\u300cen\u300d\u304c\u3044\u3044\u3067\u3057\u3087\u3046\u3002<\/li>\n<\/ul>\n<p><strong>\uff14\uff0e\u6a29\u9650\u306e\u5909\u66f4<\/strong><\/p>\n<p>\u4ee5\u4e0b\u306e\uff12\u30d5\u30a9\u30eb\u30c0\u306f\u6a29\u9650\u304c\u300c<strong>777<\/strong>\u300d\u306b\u306a\u3063\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<ul>\n<li><strong>\/storage<\/strong><\/li>\n<li><strong>\/bootstrap\/cache<\/strong><\/li>\n<\/ul>\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3063\u3066\u6a29\u9650\u3092\u5909\u66f4\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre><strong>sudo chmod 777 storage -R<\/strong><\/pre>\n<pre><strong>sudo chmod 777 bootstrap\/cache -R<\/strong><\/pre>\n<p>\u3055\u3041\u3001\u4ee5\u4e0a\u3067\u57fa\u672c\u7684\u306a\u8a2d\u5b9a\u306f\u7d42\u4e86\u3067\u3059\u3002<\/p>\n<h1>\u30ed\u30b0\u30a4\u30f3\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u30ea\u30de\u30a4\u30f3\u30c0\u30fc\u6a5f\u80fd\u3092\u69cb\u7bc9<\/h1>\n<p><strong style=\"color: #cc0000;\">\u3010\u6ce8\u610f\u3011Laravel 6.0\u4ee5\u964d\u306f\u30ed\u30b0\u30a4\u30f3\u6a5f\u80fd\u304c\u5225\u30d1\u30c3\u30b1\u30fc\u30b8\u3067\u7ba1\u7406\u3055\u308c\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u305f\u3081\u624b\u9806\u304c\u9055\u3044\u307e\u3059\u3002\u8a73\u3057\u304f\u306f\u3001<a href=\"https:\/\/blog.capilano-fw.com\/?p=4576\">\u3053\u3061\u3089\u306e\u30da\u30fc\u30b8<\/a>\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/strong><\/p>\n<p>\u3082\u3057\u3001\u30ed\u30b0\u30a4\u30f3\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u305f\u3044\u5834\u5408\u306f\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\uff12\u767a\u3067\u4f5c\u6210\u304c\u5b8c\u4e86\u3057\u307e\u3059\u3002\uff08\u305f\u3060\u3057\u65e5\u672c\u8a9e\u5316\u3059\u308b\u5fc5\u8981\u3042\u308a\u3002\u5f8c\u3067\u8aac\u660e\u3057\u307e\u3059\uff09<\/p>\n<pre><strong>php artisan make:auth<\/strong><\/pre>\n<pre><strong>php artisan migrate<\/strong><\/pre>\n<p>\u306f\u3044\u3001\u3053\u308c\u3067\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u306f<strong>users<\/strong>\u306a\u3069\u306e\u8a8d\u8a3c\u306b\u5fc5\u8981\u306a\u30c6\u30fc\u30d6\u30eb\u304c\u4f5c\u6210\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u305f\u3060\u3001\u307e\u3060\u30e6\u30fc\u30b6\u30fc\u306f\u767b\u9332\u3055\u308c\u3066\u3044\u306a\u3044\u306e\u3067\u3001seeder\u3092\u4f5c\u3063\u3066\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304c\u30ea\u30d5\u30ec\u30c3\u30b7\u30e5\u3055\u308c\u3066\u3082\u3001\u30c6\u30b9\u30c8\u30e6\u30fc\u30b6\u30fc\u304c\u81ea\u52d5\u3067\u767b\u9332\u3055\u308c\u308b\u3088\u3046\u306b\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u307e\u305a\u306f\u30b3\u30de\u30f3\u30c9\u3067seeder\u306e\u96db\u5f62\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<pre><strong>php artisan make:seed UsersTableSeeder<\/strong><\/pre>\n<p><strong>\/database\/seeds\/UsersTableSeeder.php<\/strong>\u304c\u4f5c\u6210\u3055\u308c\u308b\u306e\u3067\u3001\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u3044\u3066\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5909\u66f4\u3002<\/p>\n<pre>&lt;?php\r\n\r\nuse Illuminate\\Database\\Seeder;\r\n\r\nclass UsersTableSeeder extends Seeder\r\n{\r\n    \/**\r\n     * Run the database seeds.\r\n     *\r\n     * @return void\r\n     *\/\r\n    public function run()\r\n    {\r\n        \\App\\User::create([\r\n            'name' =&gt; '\u5c71\u7530\u592a\u6717',\r\n            'email' =&gt; 'taro@example.com',\r\n            'password' =&gt; <strong>bcrypt('YOUR-PASSWORD')<\/strong>\r\n        ]);\r\n    }\r\n}<\/pre>\n<p>\u203bbcrypt\u306e\u90e8\u5206\u3067\u306f\u6697\u53f7\u5316\u3092\u3057\u3066\u3044\u307e\u3059\u3002\u3064\u307e\u308a\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u4e2d\u8eab\u306f\u6697\u53f7\u5316\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u3001\u4e07\u304c\u4e00\u30c7\u30fc\u30bf\u304c\u6d41\u51fa\u3057\u3066\u3082\u3001\u3053\u306e\u60c5\u5831\u3060\u3051\u3067\u306f\u30ed\u30b0\u30a4\u30f3\u3067\u304d\u306a\u3044\u3068\u3044\u3046\u308f\u3051\u3067\u3059\u306d\u3002\u9006\u306b\u8a00\u3046\u3068\u3053\u3053\u3067<strong>bcrypt<\/strong>\u3067\u6697\u53f7\u5316\u3057\u3066\u3044\u306a\u3044\u3068\u3001\u304d\u3061\u3093\u3068\u30ed\u30b0\u30a4\u30f3\u3067\u304d\u306a\u304f\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u3057\u3066\u3001\u3053\u306eSeeder\u3092\u6709\u52b9\u306b\u3059\u308b\u305f\u3081\u306b\/database\/seeds\/DatabaseSeeder.php\u306e\u4e2d\u3067\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8a2d\u5b9a\u3057\u307e\u3059\u3002\uff08\u30c7\u30d5\u30a9\u30eb\u30c8\u3067UsersTableSeeder\u306f\u8a18\u8ff0\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u3001\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3092\u5916\u3059\u3060\u3051\u3067\u3059\uff09<\/p>\n<pre><strong>public function run()<\/strong>\r\n<strong>{<\/strong>\r\n<strong>     $this-&gt;call(UsersTableSeeder::class);<\/strong>\r\n<strong>}<\/strong><\/pre>\n<p>\u3055\u3041\u3001\u3053\u308c\u3067\u5b8c\u4e86\u3067\u3059\u3002\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u30e6\u30fc\u30b6\u30fc\u3092\u767b\u9332\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre><strong>php artisan migrate:fresh --seed<\/strong><\/pre>\n<p>\u203b\u5b9f\u969b\u306b\u306fseeder\u3060\u3051\u306e\u30b3\u30de\u30f3\u30c9\u304c\u3042\u308a\u307e\u3059\u3051\u3069\u3001\u3053\u308c\u306a\u3089DB\u3092\u521d\u671f\u5316 + \u30c6\u30b9\u30c8\u30e6\u30fc\u30b6\u30fc\u8ffd\u52a0\u307e\u3067\u3084\u3063\u3066\u304f\u308c\u308b\u3093\u3067\u3001\u3053\u3063\u3061\u306e\u65b9\u304c\u4fbf\u5229\u3060\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u3055\u3041\u3001\u3053\u308c\u3067\u30e6\u30fc\u30b6\u30fc\u304c\u8ffd\u52a0\u3055\u308c\u305f\u306e\u3067\u3001<strong>http:\/\/YOUR-DOMAIN\/login<\/strong>\u304b\u3089\u30ed\u30b0\u30a4\u30f3\u3057\u3066\u307f\u307e\u3057\u3087\u3046\uff01<\/p>\n<p><strong>\u8ffd\u8a18\uff1a2018\/11\/28<\/strong><\/p>\n<p>Laravel 5.7.14\u306e\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3067\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u30d1\u30b9\u30ef\u30fc\u30c9\u30ea\u30de\u30a4\u30f3\u30c0\u30fc\u6a5f\u80fd\u3060\u3051\u7121\u52b9\u306b\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<pre><strong>\/\/ routes\/web.php\r\n\r\nAuth::routes(['reset' =&gt; false]);<\/strong><\/pre>\n<h1>\u65e5\u672c\u8a9e\u5316<\/h1>\n<p>\u305f\u3060\u3057\u3001\u3053\u306e\u307e\u307e\u3060\u3068\u82f1\u8a9e\u306e\u307e\u307e\u306b\u306a\u3063\u3066\u308b\u306e\u3067\u3001\u4ee5\u4e0b\uff13\u30ab\u6240\u3092\u5909\u66f4\u3057\u3066\u65e5\u672c\u8a9e\u5316\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<ol>\n<li><strong>\u30d5\u30a9\u30fc\u30e0<\/strong>\u3000\u30fb\u30fb\u30fb\u3000\u30ed\u30b0\u30a4\u30f3\u3084\u30d1\u30b9\u30ef\u30fc\u30c9\u30ea\u30de\u30a4\u30f3\u30c0\u30fc\u306eHTML<\/li>\n<li><strong>\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3<\/strong>\u3000\u30fb\u30fb\u30fb\u3000\u30a8\u30e9\u30fc\u6587\u7ae0<\/li>\n<li><strong>\u30e1\u30fc\u30eb\u6587\u9762<\/strong>\u3000\u30fb\u30fb\u30fb\u3000\u30d1\u30b9\u30ef\u30fc\u30c9\u518d\u767a\u884c\u306e\u30e1\u30fc\u30eb\u6587\u9762<\/li>\n<\/ol>\n<p>\u3053\u308c\u3082\u3072\u3068\u3064\u3072\u3068\u3064\u898b\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<h2><strong>\uff11\uff0e\u30d5\u30a9\u30fc\u30e0\u306e\u30d3\u30e5\u30fc<\/strong><\/h2>\n<p><strong>\/resources\/views\/auth<\/strong>\u4ee5\u4e0b\u306e\uff14\u30d5\u30a1\u30a4\u30eb\u3067\u3059\u3002<\/p>\n<ul>\n<li><strong>login.blade.php<\/strong><\/li>\n<li><strong>register.blade.php<\/strong><\/li>\n<li><strong>passwords\/email.blade.php<\/strong><\/li>\n<li><strong>passwords\/reset.blade.php<\/strong><\/li>\n<\/ul>\n<p>\u7ffb\u8a33\u3059\u3079\u304d\u5185\u5bb9\u306f\u3001\u4ee5\u4e0b\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<ul>\n<li>Login\u3000\u2192\u3000\u30ed\u30b0\u30a4\u30f3<\/li>\n<li>Password\u3000\u2192\u3000\u30d1\u30b9\u30ef\u30fc\u30c9<\/li>\n<li>Confirm Password\u3000\u2192\u3000\u30d1\u30b9\u30ef\u30fc\u30c9\uff08\u78ba\u8a8d\uff09<\/li>\n<li>Name\u3000\u2192\u3000\u30e6\u30fc\u30b6\u30fc\u540d<\/li>\n<li>Register\u3000\u2192\u3000\u30e6\u30fc\u30b6\u30fc\u767b\u9332<\/li>\n<li>E-Mail Address\u3000\u2192\u3000\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9<\/li>\n<li>Forgot Your Password?\u3000\u2192\u3000\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5fd8\u308c\u307e\u3057\u305f\u304b\uff1f<\/li>\n<li>Reset Password\u3000\u2192\u3000\u30d1\u30b9\u30ef\u30fc\u30c9\u518d\u767a\u884c<\/li>\n<li>Send Password Reset Link\u3000\u2192\u3000\u30d1\u30b9\u30ef\u30fc\u30c9\u518d\u767a\u884cURL\u3092\u9001\u4fe1<\/li>\n<\/ul>\n<p>\uff08\u3067\u304d\u305f\u3089\u3001\u305d\u308d\u305d\u308d\u3053\u306e\u8fba\u3082Laravel\u306e\u65b9\u3067\u81ea\u52d5\u7684\u306b\u8a00\u8a9e\u5909\u66f4\u3057\u3066\u307b\u3057\u3044\u3067\u3059\u306d\u30fc\u3002\uff09<\/p>\n<h2><strong>\uff12\uff0e\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3<\/strong><\/h2>\n<p><a href=\"https:\/\/github.com\/caouecs\/Laravel-lang\" target=\"_blank\" rel=\"noopener noreferrer\">Laravel-lang<\/a>\u3068\u3044\u3046GitHub\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u3001\u4e16\u754c\u5404\u56fd\u306e\u7ffb\u8a33\u30c7\u30fc\u30bf\u3092\u516c\u958b\u3057\u3066\u3044\u307e\u3059\u3002\u65e5\u672c\u8a9e\u306e\u30d5\u30a9\u30eb\u30c0\u306f<a href=\"https:\/\/github.com\/caouecs\/Laravel-lang\/tree\/master\/src\/ja\" target=\"_blank\" rel=\"noopener noreferrer\">\u3053\u3061\u3089<\/a>\u3002<br \/>\n\u7528\u610f\u3055\u308c\u3066\u3044\u308b\u30d5\u30a1\u30a4\u30eb\u306f\uff14\u3064\u3067\u3059\u3002<\/p>\n<ul>\n<li><strong>auth.php<\/strong><\/li>\n<li><strong>pagination.php<\/strong><\/li>\n<li><strong>passwords.php<\/strong><\/li>\n<li><strong>validation.php<\/strong><\/li>\n<\/ul>\n<p><strong>\/resources\/lang\/ja<\/strong>\u3068\u3044\u3046\u30d5\u30a9\u30eb\u30c0\u3092\u4f5c\u6210\u3057\u3001\u3053\u308c\u3089\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u8a2d\u7f6e\u3059\u308c\u3070\u5b8c\u4e86\u3067\u3059\u3002<\/p>\n<p>\u305f\u3060\u3057\u3001\u5b9f\u306f\u3053\u308c\u3060\u3051\u3067\u306f\u4e0d\u5341\u5206\u3067\u3001\u30a8\u30e9\u30fc\u6587\u7ae0\u304c<\/p>\n<pre><strong>email\u306f\u3001\u5fc5\u305a\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/strong><\/pre>\n<p>\u3068\u304b\u3001<\/p>\n<pre><strong>password\u306f\u3001\u5fc5\u305a\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/strong><\/pre>\n<p>\u3068\u3044\u3046\u5177\u5408\u306b\u3001<span style=\"text-decoration: underline;\">input\u30bf\u30b0\u306ename\u304c\u8868\u793a\u3055\u308c\u3066\u3057\u307e\u3044\u307e\u3059\u3002<\/span><\/p>\n<p>\u3053\u308c\u3092\u6539\u5584\u3059\u308b\u305f\u3081\u306b\u3001<strong>\/resources\/lang\/ja\/validation.php<\/strong>\u306e\u4e2d\u306b\u3042\u308b\u3001<strong>attributes<\/strong>\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5909\u66f4\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre>'attributes' =&gt; [\r\n    'email' =&gt; '\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9',\r\n    'password' =&gt; '\u30d1\u30b9\u30ef\u30fc\u30c9',\r\n    'password_confirmation' =&gt; '\u30d1\u30b9\u30ef\u30fc\u30c9\uff08\u78ba\u8a8d\uff09',\r\n    'name' =&gt; '\u30e6\u30fc\u30b6\u30fc\u540d'\r\n],<\/pre>\n<p>\u3053\u308c\u3067\u3001\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u306e\u65e5\u672c\u8a9e\u5316\u3082\u5b8c\u4e86\u3067\u3059\u3002<\/p>\n<h2><strong>\uff13\uff0e\u30e1\u30fc\u30eb\u6587\u9762<\/strong><\/h2>\n<p>\u30d1\u30b9\u30ef\u30fc\u30c9\u518d\u767a\u884c\u306e\u624b\u7d9a\u304d\u3092\u3059\u308b\u5834\u5408\u3001\u518d\u767a\u884cURL\u3092\u9001\u4fe1\u3059\u308b\u3093\u3067\u3059\u304c\u3001\u3053\u306e\u30e1\u30fc\u30eb\u5185\u5bb9\u304c\u30d0\u30ea\u30d0\u30ea\u306e\u82f1\u8a9e\u306a\u306e\u3067\u3001\u3053\u308c\u3082\u5909\u66f4\u3057\u307e\u3059\u3002<br \/>\n\uff08\u3053\u3053\u306f\u3061\u3087\u3063\u3068\u8907\u96d1\u3067\u3059\uff09<\/p>\n<p>\u307e\u305a\u3001<strong>ResetPasswordNotification<\/strong>\u3068\u3044\u3046\u5c02\u7528\u306e<strong>Notification<\/strong>\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<br \/>\n\u3053\u308c\u3082\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3063\u3066\u3084\u308a\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre><strong>php artisan make:notification ResetPasswordNotification<\/strong><\/pre>\n<p>\u4f5c\u6210\u3057\u305f\u3089\u3001<strong>app\/Notifications\/ResetPasswordNotification.php<\/strong>\u3092\u958b\u3044\u3066\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n<pre>&lt;?php\r\n\r\nnamespace App\\Notifications;\r\n\r\nuse Illuminate\\Bus\\Queueable;\r\nuse Illuminate\\Notifications\\Notification;\r\nuse Illuminate\\Contracts\\Queue\\ShouldQueue;\r\nuse Illuminate\\Notifications\\Messages\\MailMessage;\r\n\r\nclass ResetPasswordNotification extends Notification\r\n{\r\n    use Queueable;\r\n\r\n    \/**\r\n     * Create a new notification instance.\r\n     *\r\n     * @return void\r\n     *\/\r\n    public function __construct(<strong>$token<\/strong>)\r\n    {\r\n        <strong>$this-&gt;token = $token;<\/strong>\r\n    }\r\n\r\n    \/**\r\n     * Get the notification's delivery channels.\r\n     *\r\n     * @param  mixed  $notifiable\r\n     * @return array\r\n     *\/\r\n    public function via($notifiable)\r\n    {\r\n        return ['mail'];\r\n    }\r\n\r\n    \/**\r\n     * Get the mail representation of the notification.\r\n     *\r\n     * @param  mixed  $notifiable\r\n     * @return \\Illuminate\\Notifications\\Messages\\MailMessage\r\n     *\/\r\n    public function toMail($notifiable)\r\n    {\r\n        return (new MailMessage)\r\n            -&gt;from('admin@example.com', config('app.name'))\r\n            -&gt;subject('\u30d1\u30b9\u30ef\u30fc\u30c9\u518d\u767a\u884c')\r\n            -&gt;line('\u30d1\u30b9\u30ef\u30fc\u30c9\u518d\u767a\u884c\u30ea\u30af\u30a8\u30b9\u30c8\u304c\u3042\u308a\u307e\u3057\u305f\u306e\u3067\u3001\u30e1\u30c3\u30bb\u30fc\u30b8\u9001\u4fe1\u3057\u307e\u3057\u305f\u3002')\r\n            -&gt;action('\u30d1\u30b9\u30ef\u30fc\u30c9\u518d\u8a2d\u5b9a', url(config('app.url').route('password.reset', $this-&gt;token, false)))\r\n            -&gt;line('\u3082\u3057\u5fc3\u5f53\u305f\u308a\u304c\u306a\u3044\u5834\u5408\u306f\u3001\u672c\u30e1\u30c3\u30bb\u30fc\u30b8\u306f\u7834\u68c4\u3057\u3066\u304f\u3060\u3055\u3044\u3002');\r\n    }\r\n\r\n    \/**\r\n     * Get the array representation of the notification.\r\n     *\r\n     * @param  mixed  $notifiable\r\n     * @return array\r\n     *\/\r\n    public function toArray($notifiable)\r\n    {\r\n        return [\r\n            \/\/\r\n        ];\r\n    }\r\n}<\/pre>\n<p>\u3053\u3053\u3067\u91cd\u8981\u306a\u306e\u306f\u3001__construct()\u5185\u306e\u3001<strong>$token<\/strong>\u3067\u3059\u3002<br \/>\n\u3053\u308c\u306f\u3001\u518d\u767a\u884c\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u9001\u4fe1\u3059\u308b\u969b\u306b\u30c8\u30fc\u30af\u30f3\u3092\u53d7\u3051\u53d6\u3063\u3066\u3001\u305d\u306e\u30c8\u30fc\u30af\u30f3\u3092\u542b\u3093\u3060URL\u3092\u4f5c\u6210\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u304b\u3089\u3067\u3059\u3002<\/p>\n<p>\u5b9f\u969b\u306e\u4f7f\u3044\u65b9\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n<strong>app\/User.php<\/strong>\u306b<strong>sendPasswordResetNotification()<\/strong>\u3092\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\u3002\uff08\u30aa\u30fc\u30d0\u30fc\u30e9\u30a4\u30c9\uff09<\/p>\n<pre>&lt;?php\r\n\r\nnamespace App;\r\n\r\n<strong>use App\\Notifications\\ResetPasswordNotification;<\/strong>\r\nuse Illuminate\\Notifications\\Notifiable;\r\nuse Illuminate\\Foundation\\Auth\\User as Authenticatable;\r\n\r\nclass User extends Authenticatable\r\n{\r\n    use Notifiable;\r\n\r\n    \/* \uff08\u7701\u7565\uff09  *\/\r\n\r\n<strong>    public function sendPasswordResetNotification($token)<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        $this-&gt;notify(new ResetPasswordNotification($token));<\/strong>\r\n<strong>    }<\/strong>\r\n}<\/pre>\n<p>\u3055\u3041\u3001\u3053\u308c\u3067\u5b8c\u6210\uff01<br \/>\n\u30fb\u30fb\u30fb\u3068\u8a00\u3044\u305f\u3044\u3068\u3053\u308d\u3067\u3059\u304c\u3001\u3053\u308c\u3060\u3051\u3067\u306f\u307e\u3060\u4e0d\u5341\u5206\u3067\u3001\u304a\u305d\u3089\u304f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30e1\u30fc\u30eb\u6587\u9762\u306b\u306a\u3063\u3066\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"-image-292\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/02\/MailCatcher-1-1-1.png\" alt=\"\" width=\"593\" height=\"429\" \/><\/p>\n<p>\u5b9f\u306fNofitication\u3082View\u306e\u3088\u3046\u306b\u30ec\u30a4\u30a2\u30a6\u30c8\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u3066\u3001\u3053\u308c\u3092\u5909\u66f4\u3057\u306a\u3044\u3068\u3044\u3064\u307e\u3067\u3082\u300cHello!\u300d\u3068\u3044\u3046\u30d5\u30e9\u30f3\u30af\u306a\uff08\u7b11\uff09\u3042\u3044\u3055\u3064\u6587\u304c\u9001\u4fe1\u3055\u308c\u3066\u3057\u307e\u3044\u307e\u3059\u3002<\/p>\n<p>\u306a\u306e\u3067\u3001\u6b21\u306fNotification\u306e\u30ec\u30a4\u30a2\u30a6\u30c8\u3092\u5909\u66f4\u3057\u307e\u3057\u3087\u3046\u3002<br \/>\n\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u3001publish\u3057\u307e\u3059\u3002<\/p>\n<pre><strong>php artisan vendor:publish<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u3001\u3044\u304f\u3064\u304b\u30ea\u30b9\u30c8\u304c\u8868\u793a\u3055\u308c\u308b\u3068\u601d\u3046\u306e\u3067\u3001<\/p>\n<pre>laravel-notifications<\/pre>\n<p>\u3068\u66f8\u304b\u308c\u305f\u756a\u53f7\u3092\u5165\u529b\u3057\u3066\u30a8\u30f3\u30bf\u30fc\u30ad\u30fc\u3092\u62bc\u3057\u307e\u3057\u3087\u3046\uff08\u50d5\u306e\u74b0\u5883\u3067\u306f6\u756a\u3067\u3057\u305f\u3002\uff09<\/p>\n<p><strong>\/resources\/views\/vendor\/notifications\/notifications.blade.php<\/strong>\u304c\u4f5c\u6210\u3055\u308c\u308b\u306e\u3067\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u5185\u306e<\/p>\n<ul>\n<li><strong>Hello!<\/strong><\/li>\n<li><strong>Regards,<\/strong><\/li>\n<li><strong>If you\u2019re having trouble clicking the&#8230;.<\/strong><\/li>\n<\/ul>\n<p>\u306e\uff13\u30ab\u6240\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u65e5\u672c\u8a9e\u306b\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n<pre>@component('mail::message')\r\n{{-- Greeting --}}\r\n@if (! empty($greeting))\r\n# {{ $greeting }}\r\n@else\r\n@if ($level == 'error')\r\n# Whoops!\r\n@else\r\n# <strong>\u3053\u3093\u306b\u3061\u306f\u3002<\/strong>\r\n@endif\r\n@endif\r\n\r\n{{-- Intro Lines --}}\r\n@foreach ($introLines as $line)\r\n{{ $line }}\r\n\r\n@endforeach\r\n\r\n{{-- Action Button --}}\r\n@isset($actionText)\r\n&lt;?php\r\n    switch ($level) {\r\n        case 'success':\r\n            $color = 'green';\r\n            break;\r\n        case 'error':\r\n            $color = 'red';\r\n            break;\r\n        default:\r\n            $color = 'blue';\r\n    }\r\n?&gt;\r\n@component('mail::button', ['url' =&gt; $actionUrl, 'color' =&gt; $color])\r\n{{ $actionText }}\r\n@endcomponent\r\n@endisset\r\n\r\n{{-- Outro Lines --}}\r\n@foreach ($outroLines as $line)\r\n{{ $line }}\r\n\r\n@endforeach\r\n\r\n{{-- Salutation --}}\r\n@if (! empty($salutation))\r\n{{ $salutation }}\r\n@else\r\n<strong>{{ config('app.name') }} \u3088\u308a<\/strong>\r\n@endif\r\n\r\n{{-- Subcopy --}}\r\n@isset($actionText)\r\n@component('mail::subcopy')\r\n<strong>\u3082\u3057\u3001\u300c{{ $actionText }}\u30dc\u30bf\u30f3\u300d\u304c\u3046\u307e\u304f\u6a5f\u80fd\u3057\u306a\u3044\u5834\u5408\u3001\u4ee5\u4e0b\u306eURL\u3092\u30b3\u30d4\u30fc\uff06\u30da\u30fc\u30b9\u30c8\u3057\u3066\u76f4\u63a5\u30d6\u30e9\u30a6\u30b6\u304b\u3089\u30a2\u30af\u30bb\u30b9\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/strong>\r\n<strong> [{{ $actionUrl }}]({{ $actionUrl }})<\/strong>\r\n@endcomponent\r\n@endisset\r\n@endcomponent<\/pre>\n<p>\u203bblade\u306e\u4e2d\u8eab\u3092\u898b\u308b\u3068\u3001<strong>$greeting<\/strong>\u304c\u5b58\u5728\u3057\u3066\u3044\u308c\u3070\u3001\u305d\u3061\u3089\u304c\u9069\u7528\u3055\u308c\u307e\u3059\u306e\u3067\u3001\u300c\u304a\u306f\u3088\u3046\u3054\u3056\u3044\u307e\u3059\u300d\u3084\u300c\u3053\u3093\u3070\u3093\u306f\u300d\u306a\u3069\u6642\u9593\u3067\u5909\u66f4\u3059\u308b\u3053\u3068\u3082\u53ef\u80fd\u3067\u3059\u306d\u3002<\/p>\n<p>\u203b\u3042\u3068\u306f\u3001\u3088\u304f\u3042\u308b\u30b5\u30a4\u30c8\u540d\u306f\u30ea\u30f3\u30af\u306a\u3069\u3001\u30e1\u30fc\u30eb\u30fb\u30d5\u30c3\u30bf\u30fc\u3092\u3064\u304f\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u306e\u3067\u3001\u3044\u308d\u3044\u308d\u3068\u8a66\u3057\u3066\u307f\u3066\u4e0b\u3055\u3044\u3002<\/p>\n<p>\u3055\u3041\u3001\u3053\u308c\u3067\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30e1\u30fc\u30eb\u304c\u53d7\u4fe1\u3067\u304d\u305f\u306f\u305a\u3067\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-293\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/02\/MailCatcher-2-.png\" alt=\"\" width=\"581\" height=\"400\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/02\/MailCatcher-2-.png 581w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/02\/MailCatcher-2--300x207.png 300w\" sizes=\"auto, (max-width: 581px) 100vw, 581px\" \/><\/p>\n<p>\u4ee5\u4e0a\u3067\u3001\u5168\u3066\u7d42\u4e86\u3067\u3059\u3002<br \/>\n\u304a\u75b2\u308c\u69d8\u3067\u3057\u305f\u3002<\/p>\n<h1>\u304a\u308f\u308a\u306b<\/h1>\n<p>Laravel Lover\u3068\u3057\u3066\u306f\u3001\u3044\u308d\u3093\u306a\u6a5f\u80fd\u304c\u3069\u3093\u3069\u3093\u8ffd\u52a0\u3055\u308c\u3066\u5b09\u3057\u3044\u3093\u3067\u3059\u3051\u3069\u3001\u4eca\u304b\u3089\u5b66\u7fd2\u3057\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u30d7\u30ed\u30b0\u30e9\u30de\u30fc\u3055\u3093\u306f\u7d50\u69cb\u5927\u5909\u306a\u306e\u304b\u306a\u30fc\u3001\u306a\u3093\u3066\u601d\u3063\u305f\u308a\u3082\u3057\u307e\u3059\u3002\uff08\u82e5\u624b\u306e\u65b9\u306f\u3001\u3082\u306f\u3084PHP\u3058\u3083\u306a\u304f\u3066node\u3068\u304b\u306e\u5225\u8a00\u8a9e\u304b\u3082\u3067\u3059\u3051\u3069\u306d\u30fc^^;\uff09<\/p>\n<p>\u3067\u306f\u3067\u306f\u301c\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3055\u3066\u3001Laravel5.6\u304c\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u3066\u5c11\u3057\u7d4c\u3061\u307e\u3057\u305f\u3002 \u904b\u304c\u3044\u3044\u3053\u3068\u306b\u3001\u3042\u308b\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u69d8\u304b\u3089\u6700\u65b0\u74b0\u5883\u3067\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u3092\u69cb\u7bc9\u3057\u305f\u3044\u3068\u306e\u3054\u4f9d\u983c\u3092\u3044\u305f\u3060\u3044\u305f\u305f\u3081\u3001 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.capilano-fw.com\/?p=289\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;\u3010Laravel5.6\u3011\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u76f4\u5f8c\u306b\u3084\u308b\u3053\u3068\uff13\u70b9&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":2730,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,10],"tags":[41],"class_list":["post-289","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-laravel","category-php","tag-41"],"_links":{"self":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/289","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=289"}],"version-history":[{"count":6,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/289\/revisions"}],"predecessor-version":[{"id":4585,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/289\/revisions\/4585"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/media\/2730"}],"wp:attachment":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=289"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=289"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=289"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}