{"id":1147,"date":"2018-09-07T18:16:32","date_gmt":"2018-09-07T09:16:32","guid":{"rendered":"https:\/\/blog.capilano-fw.com\/?p=1147"},"modified":"2018-10-09T05:02:46","modified_gmt":"2018-10-08T20:02:46","slug":"laravel-5-7-%e3%81%ae%e6%96%b0%e6%a9%9f%e8%83%bd%e3%81%be%e3%81%a8%e3%82%81","status":"publish","type":"post","link":"https:\/\/blog.capilano-fw.com\/?p=1147","title":{"rendered":"Laravel 5.7 \u306e\u65b0\u6a5f\u80fd\u307e\u3068\u3081"},"content":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u524d\u56de\u306e\u8a18\u4e8b\u300c<a href=\"https:\/\/blog.capilano-fw.com\/?p=1099\">Laravel 5.7 \u306eEmail Verification\uff08\u672c\u767b\u9332\u30e1\u30fc\u30eb\uff09\u306e\u4f7f\u3044\u65b9<\/a>\u300d\u3067\u306f\u3001\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u305f\u3070\u304b\u308a\u306eLaravel <code>5.7<\/code>\u00a0\u304b\u3089\u65b0\u6a5f\u80fd\u306e\u3072\u3068\u3064\u3092\u304a\u5c4a\u3051\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u4eca\u56de\u306fLaravel 5.7 \u3067\u8ffd\u52a0\u3055\u308c\u305f\u305d\u306e\u4ed6\u306e\u65b0\u3057\u3044\u6a5f\u80fd\u3092\u307e\u3068\u3081\u3066\u307f\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u305c\u3072\u52b9\u7387\u7684\u306a\u30b5\u30a4\u30c8\u69cb\u7bc9\u306b\u5f79\u7acb\u3066\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-418 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/04\/35.png\" alt=\"\" width=\"370\" height=\"240\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/04\/35.png 370w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/04\/35-300x195.png 300w\" sizes=\"auto, (max-width: 370px) 100vw, 370px\" \/><\/p>\n<h1>\u30d5\u30a9\u30eb\u30c0\u69cb\u9020\u304c\u5909\u66f4\u306b\u306a\u3063\u305f<\/h1>\n<p>\u5c0f\u3055\u306a\u5909\u66f4\u3067\u3059\u304c\u3001Laravel <code>5.7<\/code> \u3067\u306f\u3001<code>resources<\/code>\u5185\u30d5\u30a9\u30eb\u30c0\u69cb\u9020\u304c\u5e73\u5766\u5316\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<p>\u30d0\u30fc\u30b8\u30e7\u30f3 5.6 \u306e\u5834\u5408\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b<code>assets<\/code>\u304c\u5b58\u5728\u3057\u3066\u3044\u307e\u3057\u305f\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1151\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/Screenshot-from-2018-09-07-01-48-58.png\" alt=\"\" width=\"275\" height=\"171\" \/><\/p>\n<p>\u305d\u308c\u304c\u4eca\u56de\u306e\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3067\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5e73\u5766\u306a\u69cb\u9020\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1150\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/Screenshot-from-2018-09-07-01-50-25.png\" alt=\"\" width=\"331\" height=\"150\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/Screenshot-from-2018-09-07-01-50-25.png 331w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/Screenshot-from-2018-09-07-01-50-25-300x136.png 300w\" sizes=\"auto, (max-width: 331px) 100vw, 331px\" \/><\/p>\n<h1>Eloquent\u30e2\u30c7\u30eb\u306e\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u6539\u5584\u3055\u308c\u305f<\/h1>\n<p>\u4f8b\u3048\u3070\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u5b58\u5728\u3057\u306a\u3044\u30e1\u30bd\u30c3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u5834\u5408\u3067\u3059\u3002<\/p>\n<pre><strong>\\App\\User::nothing(); <\/strong>\/\/ nothing()\u306f\u5b58\u5728\u3057\u306a\u3044<\/pre>\n<p>\u3053\u308c\u3092\u5b9f\u884c\u3059\u308b\u3068Laravel <code>5.6<\/code>\u00a0\u306e\u5834\u5408\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30a8\u30e9\u30fc\u3092\u8868\u793a\u3057\u3066\u3044\u307e\u3057\u305f\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1148\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/error_laravel_56.png\" alt=\"\" width=\"418\" height=\"172\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/error_laravel_56.png 418w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/error_laravel_56-300x123.png 300w\" sizes=\"auto, (max-width: 418px) 100vw, 418px\" \/><\/p>\n<p>\u30a8\u30e9\u30fc\u5185\u5bb9\u3092\u898b\u3066\u307f\u308b\u3068\u3001<code>Builder::nothing()<\/code>\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u300cdoes not exist\u300d\u3068\u66f8\u304b\u308c\u3066\u3044\u308b\u306e\u3067\u3001\u4f55\u304b\u304c\u5b58\u5728\u3057\u306a\u3044\u3053\u3068\u306f\u5206\u304b\u308b\u3082\u306e\u306e\u809d\u5fc3\u306e\u300c\u3069\u3053\u306e\uff1f\u300d\u304c\u629c\u3051\u3066\u3057\u307e\u3063\u3066\u3044\u307e\u3057\u305f\u3002<\/p>\n<p>\u3053\u308c\u304cLaravel <code>5.7<\/code>\u3067\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u6539\u5584\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1149\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/error_laravel_57.png\" alt=\"\" width=\"419\" height=\"173\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/error_laravel_57.png 419w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/error_laravel_57-300x124.png 300w\" sizes=\"auto, (max-width: 419px) 100vw, 419px\" \/><\/p>\n<p>\u300c<code>App\\User::nothing()<\/code>\u3068\u3044\u3046\u307e\u3060\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u306a\u3044\u30e1\u30bd\u30c3\u30c9\u304c\u547c\u3070\u308c\u307e\u3057\u305f\u3002\u300d<\/p>\n<p>\u3068\u3001\u3069\u3053\u306e\u4f55\u3067\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u3066\u3044\u308b\u304b\u3092\u6559\u3048\u3066\u304f\u308c\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<h1>Pagination\uff08\u30da\u30fc\u30b8\u30ea\u30f3\u30af\uff09\u3067\u4e21\u30b5\u30a4\u30c9\u306e\u4ef6\u6570\u304c\u6307\u5b9a\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u305f<\/h1>\n<p>\u4f8b\u3048\u3070\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30b3\u30fc\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u901a\u5e38\u306e\u30da\u30fc\u30b8\u9001\u308a\u30ea\u30f3\u30af\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002\uff08\u898b\u305f\u76ee\u306fCSS\u3067\u88c5\u98fe\u3057\u3066\u3044\u307e\u3059\uff09<\/p>\n<pre><strong>echo \\App\\User::paginate(10)-&gt;links();<\/strong><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1152\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/new_pagination_1.png\" alt=\"\" width=\"618\" height=\"82\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/new_pagination_1.png 618w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/new_pagination_1-300x40.png 300w\" sizes=\"auto, (max-width: 618px) 100vw, 618px\" \/><\/p>\n<p>\u305d\u3057\u3066\u3001\u4eca\u56de\u8ffd\u52a0\u3055\u308c\u305f<code>onEachSide($count)<\/code>\u3092\u4f7f\u3046\u3068\u3001\u3053\u306e\u4e2d\u592e\u306e\u4e21\u30b5\u30a4\u30c9\u306b\u3042\u308b\u30ea\u30f3\u30af\u6570\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u5b9f\u969b\u306e\u4f8b\u3067\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre><strong>echo <\/strong>\\App\\User::paginate(10)-&gt;<strong>onEachSide(1)<\/strong>-&gt;links();<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1153\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/new_pagination_2.png\" alt=\"\" width=\"462\" height=\"211\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/new_pagination_2.png 462w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/new_pagination_2-300x137.png 300w\" sizes=\"auto, (max-width: 462px) 100vw, 462px\" \/><\/p>\n<p>\u306a\u304a\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u306f<code>3<\/code>\u3067\u3059\u3002<\/p>\n<h1>\u72ec\u81eaArtisan\u30b3\u30de\u30f3\u30c9\u306e\u30c6\u30b9\u30c8\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u305f<\/h1>\n<h2>\u30c6\u30b9\u30c8\u7528\u306e\u72ec\u81ea\u30b3\u30de\u30f3\u30c9\u3092\u4f5c\u308b<\/h2>\n<p>\u307e\u305a\u3001<code>TestCommand<\/code>\u3068\u3044\u3046\u72ec\u81ea\u30b3\u30de\u30f3\u30c9\u3092\u4f5c\u3063\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre><strong>php artisan make:command TestCommand<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u3001<code>app\/Console\/Commands<\/code>\u306b<code>TestCommand.php<\/code>\u304c\u4f5c\u6210\u3055\u308c\u308b\u306e\u3067\u3001\u3053\u306e\u4e2d\u306b\u3001<\/p>\n<ul>\n<li>\u597d\u304d\u306a\u98df\u3079\u7269\u3092\u7b54\u3048\u3066\u3082\u3089\u3046<\/li>\n<li>\u597d\u304d\u306a\u97f3\u697d\u30b8\u30e3\u30f3\u30eb\u3092\u9078\u3093\u3067\u3082\u3089\u3046<\/li>\n<\/ul>\n<p>\u3068\u3044\u3046\uff12\u3064\u306e\u8cea\u554f\u3068\u3001\u305d\u306e\u7d50\u679c\u3092\u8868\u793a\u3059\u308b\u3068\u3044\u3046\u30b3\u30fc\u30c9\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<p>\u30b3\u30fc\u30c9\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002\uff08\u592a\u5b57\u306e\u90e8\u5206\u304c\u8ffd\u52a0\uff0f\u5909\u66f4\u3057\u305f\u5834\u6240\u3067\u3059\uff09<\/p>\n<pre>&lt;?php\r\n\r\nnamespace App\\Console\\Commands;\r\n\r\nuse Illuminate\\Console\\Command;\r\n\r\nclass <strong>TestCommand<\/strong> extends Command\r\n{\r\n    \/**\r\n     * The name and signature of the console command.\r\n     *\r\n     * @var string\r\n     *\/\r\n    protected $signature = <strong>'command:test'<\/strong>;\r\n\r\n    \/**\r\n     * The console command description.\r\n     *\r\n     * @var string\r\n     *\/\r\n    protected $description = <strong>'\u30c6\u30b9\u30c8\u30b3\u30de\u30f3\u30c9\u3067\u3059\u3002'<\/strong>;\r\n\r\n    \/**\r\n     * Create a new command instance.\r\n     *\r\n     * @return void\r\n     *\/\r\n    public function __construct()\r\n    {\r\n        parent::__construct();\r\n    }\r\n\r\n    \/**\r\n     * Execute the console command.\r\n     *\r\n     * @return mixed\r\n     *\/\r\n    public function handle()\r\n    {\r\n        <strong>$food = $this-&gt;ask('\u597d\u304d\u306a\u98df\u3079\u7269\u306f\uff1f');<\/strong>\r\n<strong>        $music = $this-&gt;choice('\u3069\u306e\u97f3\u697d\u304c\u597d\u304d\u3067\u3059\u304b\uff1f', [<\/strong>\r\n<strong>            '\u30dd\u30c3\u30d7',<\/strong>\r\n<strong>            '\u30ed\u30c3\u30af',<\/strong>\r\n<strong>            '\u30af\u30e9\u30b7\u30c3\u30af',<\/strong>\r\n<strong>        ]);<\/strong>\r\n<strong>        $this-&gt;line('\u597d\u304d\u306a\u98df\u3079\u7269\u306f\u300c'. $food .'\u300d\u3001\u97f3\u697d\u306f\u300c'. $music .'\u300d\u3067\u3059\u3002');<\/strong>\r\n    }\r\n}<\/pre>\n<p>\u3067\u306f\u3001<code>php artisan command:test<\/code>\u3092\u5b9f\u884c\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1157\" style=\"border: 3px solid;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/Screenshot-from-2018-09-07-03-17-10_1.png\" alt=\"\" width=\"436\" height=\"63\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/Screenshot-from-2018-09-07-03-17-10_1.png 436w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/Screenshot-from-2018-09-07-03-17-10_1-300x43.png 300w\" sizes=\"auto, (max-width: 436px) 100vw, 436px\" \/><\/p>\n<p>\u307e\u305a\u597d\u304d\u306a\u98df\u3079\u7269\u3092\u7b54\u3048\u3001<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1156\" style=\"border: 3px solid;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/Screenshot-from-2018-09-07-03-17-10_2.png\" alt=\"\" width=\"436\" height=\"126\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/Screenshot-from-2018-09-07-03-17-10_2.png 436w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/Screenshot-from-2018-09-07-03-17-10_2-300x87.png 300w\" sizes=\"auto, (max-width: 436px) 100vw, 436px\" \/><\/p>\n<p>\u97f3\u697d\u306e\u30b8\u30e3\u30f3\u30eb\u3092\u9078\u3076\u3068\u3001<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1155\" style=\"border: 3px solid;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/Screenshot-from-2018-09-07-03-17-10_3.png\" alt=\"\" width=\"436\" height=\"33\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/Screenshot-from-2018-09-07-03-17-10_3.png 436w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/Screenshot-from-2018-09-07-03-17-10_3-300x23.png 300w\" sizes=\"auto, (max-width: 436px) 100vw, 436px\" \/><\/p>\n<p>\u7d50\u679c\u304c\u3053\u306e\u3088\u3046\u306b\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<h2>\u30b3\u30de\u30f3\u30c9\u3092\u30c6\u30b9\u30c8\u3059\u308b<\/h2>\n<p>\u3067\u306f\u3001\u3053\u3053\u304b\u3089\u304c\u30e1\u30a4\u30f3\u306e\u300cArtisan\u30b3\u30de\u30f3\u30c9\u306e\u30c6\u30b9\u30c8\u300d\u3067\u3059\u3002\u5b9f\u884c\u74b0\u5883\u3068\u3057\u3066\u3001<code>PHPUnit<\/code>\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<p>\u3067\u306f\u3001\u3059\u3067\u306b\u5b58\u5728\u3057\u3066\u3044\u308b<code>tests\/Unit\/ExampleTest.php<\/code>\u3092\u4f7f\u3063\u3066\u30c6\u30b9\u30c8\u3092\u4f5c\u6210\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u30b3\u30fc\u30c9\u306f\u4ee5\u4e0b\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre>&lt;?php\r\n\r\nnamespace Tests\\Unit;\r\n\r\nuse Tests\\TestCase;\r\nuse Illuminate\\Foundation\\Testing\\RefreshDatabase;\r\n\r\nclass ExampleTest extends TestCase\r\n{\r\n    \/**\r\n     * A basic test example.\r\n     *\r\n     * @return void\r\n     *\/\r\n    public function testBasicTest()\r\n    {\r\n        <strong>$this-&gt;artisan('command:test')<\/strong>\r\n<strong>            -&gt;expectsQuestion('\u597d\u304d\u306a\u98df\u3079\u7269\u306f\uff1f', '\u30ab\u30ec\u30fc')<\/strong>\r\n<strong>            -&gt;expectsQuestion('\u3069\u306e\u97f3\u697d\u304c\u597d\u304d\u3067\u3059\u304b\uff1f', '\u30ed\u30c3\u30af')<\/strong>\r\n<strong>            -&gt;expectsOutput('\u597d\u304d\u306a\u98df\u3079\u7269\u306f\u300c\u30ab\u30ec\u30fc\u300d\u3001\u97f3\u697d\u306f\u300c\u30ed\u30c3\u30af\u300d\u3067\u3059\u3002');<\/strong>\r\n    }\r\n}<\/pre>\n<p>\u307e\u305a\u3001\u30c6\u30b9\u30c8\u5b9f\u884c\u90e8\u5206\uff11\u884c\u76ee\u306e<\/p>\n<pre>$this-&gt;<strong>artisan('command:test')<\/strong><\/pre>\n<p>\u3067\u3001\u5148\u307b\u3069\u4f5c\u6210\u3057\u305f\u72ec\u81ea\u30b3\u30de\u30f3\u30c9<code>command:test<\/code>\u3092\u5b9f\u884c\u3057\u3001<\/p>\n<pre>-&gt;<strong>expectsQuestion('\u597d\u304d\u306a\u98df\u3079\u7269\u306f\uff1f', '\u30ab\u30ec\u30fc')\r\n-&gt;expectsQuestion('\u3069\u306e\u97f3\u697d\u304c\u597d\u304d\u3067\u3059\u304b\uff1f', '\u30ed\u30c3\u30af')\r\n<\/strong><\/pre>\n<p>\uff12\u3064\u306e\u671f\u5f85\u3059\u308b\u7b54\u3048\u304c\u3042\u3063\u3066\u3044\u308b\u304b\u30c1\u30a7\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n<pre>-&gt;<strong>expectsOutput('\u597d\u304d\u306a\u98df\u3079\u7269\u306f\u300c\u30ab\u30ec\u30fc\u300d\u3001\u97f3\u697d\u306f\u300c\u30ed\u30c3\u30af\u300d\u3067\u3059\u3002')<\/strong><\/pre>\n<p>\u305d\u3057\u3066\u3001\u6700\u5f8c\u306b\u8868\u793a\u304c\u6b63\u3057\u3044\u304b\u30c1\u30a7\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n<p>\u3067\u306f\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067<code>PHPUnit<\/code>\u3067\u5b9f\u884c\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre><strong>php vendor\/phpunit\/phpunit\/phpunit<\/strong><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1159\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/Screenshot-from-2018-09-07-03-50-08.png\" alt=\"\" width=\"234\" height=\"22\" \/><\/p>\n<p>\u3046\u307e\u304f\u30c6\u30b9\u30c8\u3092\u901a\u904e\u3057\u305f\u3088\u3046\u3067\u3059\u3002<\/p>\n<p>\u3067\u306f\u3001\u308f\u3056\u3068\u300c\u30ed\u30c3\u30af\u300d\u3092\u300c\u30dd\u30c3\u30d7\u300d\u306b\u5909\u66f4\u3057\u3066\u5b9f\u884c\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<pre>-&gt;<strong>expectsQuestion('\u3069\u306e\u97f3\u697d\u304c\u597d\u304d\u3067\u3059\u304b\uff1f', '\u30dd\u30c3\u30d7')<\/strong><\/pre>\n<p>\u3053\u306e\u5834\u5408\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30a8\u30e9\u30fc\u304c\u8868\u793a\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-1158\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/Screenshot-from-2018-09-07-03-50-37.png\" alt=\"\" width=\"752\" height=\"269\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/Screenshot-from-2018-09-07-03-50-37.png 752w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/Screenshot-from-2018-09-07-03-50-37-300x107.png 300w\" sizes=\"auto, (max-width: 706px) 89vw, (max-width: 767px) 82vw, 740px\" \/><\/p>\n<p>\u30a2\u30a6\u30c8\u30d7\u30c3\u30c8\u306f\u3001<\/p>\n<p><code>\u597d\u304d\u306a\u98df\u3079\u7269\u306f\u300c\u30ab\u30ec\u30fc\u300d\u3001\u97f3\u697d\u306f\u300c\u30ed\u30c3\u30af\u300d\u3067\u3059\u3002<\/code><\/p>\n<p>\u304c\u8868\u793a\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3088\uff01\u3068\u8a00\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<h1>\u5909\u6570\u306e\u4e2d\u8eab\u3092\u78ba\u8a8d\u3059\u308bDump-Server\u304c\u8ffd\u52a0\u3055\u308c\u305f<\/h1>\n<p><code>dump-server<\/code>\u3092\u4f7f\u3046\u305f\u3081\u306b\u3001\u307e\u305a\u4ee5\u4e0b\u306e\u8d77\u52d5\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<pre><strong>php artisan dump-server<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u5185\u5bb9\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002\uff08\u7d42\u4e86\u3057\u305f\u3044\u5834\u5408\u306f<code>Ctr+C<\/code>\u3067\u3059\u3002\uff09<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1161\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/Screenshot-from-2018-09-07-04-11-28.png\" alt=\"\" width=\"426\" height=\"194\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/Screenshot-from-2018-09-07-04-11-28.png 426w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/Screenshot-from-2018-09-07-04-11-28-300x137.png 300w\" sizes=\"auto, (max-width: 426px) 100vw, 426px\" \/><\/p>\n<p>\u3067\u306f\u3053\u306e\u72b6\u614b\u3067\u4ee5\u4e0b\u30b3\u30fc\u30c9\u3092\u30d6\u30e9\u30a6\u30b6\u304b\u3089\u5b9f\u884c\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre>$test = 'xxxxx';\r\n\r\n<strong>dump($test);<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u3001\u8d77\u52d5\u4e2d\u306eDump-Server\u304c\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u60c5\u5831\u3092\u8868\u793a\u3057\u3066\u304f\u308c\u307e\u3059\u3002<\/p>\n<pre>GET http:\/\/l57.test\/dump_server\r\n-------------------------------\r\n\r\n------------ -----------------------------------------\r\ndate         Thu, 06 Sep 2018 19:12:43 +0000\r\ncontroller   \"HomeController\"\r\nsource       HomeController.php on line 12\r\nfile         app\/Http\/Controllers\/HomeController.php\r\n------------ -----------------------------------------\r\n\r\n<strong>\"xxxxx\"<\/strong><\/pre>\n<p>\u3053\u306e\u3088\u3046\u306b\u3001<strong>\u30b3\u30fc\u30c9\u3092\u5b9f\u884c\u3057\u3066\u3044\u308b\u9014\u4e2d\u306b\u5909\u6570\u306e\u4e2d\u8eab\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b<\/strong>\u308f\u3051\u3067\u3059\u306d\u3002<\/p>\n<p>\u3064\u307e\u308a\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u30eb\u30fc\u30d7\u3054\u3068\u306b\u5909\u6570\u306e\u4e2d\u8eab\u304c\u5909\u308f\u3063\u3066\u3057\u307e\u3063\u3066\u3082\u3001Dump-Server\u3092\u8d77\u52d5\u3057\u3066\u3044\u308c\u3070\u5909\u6570\u306e\u4e2d\u8eab\u304c\u3069\u306e\u3088\u3046\u306b\u5909\u5316\u3057\u3066\u3044\u308b\u304b\u3001\u305d\u306e\u90fd\u5ea6\u8868\u793a\u3057\u3066\u304f\u308c\u308b\u306e\u3067\u3001\u30d0\u30b0\u4fee\u6b63\u306a\u3069\u306b\u5f79\u7acb\u3064\u3053\u3068\u3067\u3057\u3087\u3046\u3002<\/p>\n<pre>for($i = 0 ; $i &lt; 12 ; $i++) {\r\n\r\n    dump($i);\r\n\r\n}<\/pre>\n<h1>action()\u306b\u30af\u30e9\u30b9\u3092\u6307\u5b9a\u3057\u3066URL\u3092\u53d6\u5f97\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u305f<\/h1>\n<p>\u307e\u305a\u3001<code>web.php<\/code>\u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306aRoute\u304c\u3042\u308b\u3068\u3057\u307e\u3059\u3002<\/p>\n<pre><strong>Route::get('\/posts', 'PostsController@index');<\/strong>\r\n<strong>Route::get('\/posts\/{id}', 'PostsController@show');<\/strong><\/pre>\n<p>\u305d\u3057\u3066\u3001Laravel <code>5.6<\/code> \u307e\u3067\u306f\u3001<code>action()<\/code>\u3092\u4f7f\u3063\u3066\u6b21\u306e\u3088\u3046\u306bURL\u3092\u53d6\u5f97\u3059\u308b\u3053\u304c\u3067\u304d\u3066\u3044\u307e\u3057\u305f\u3002<\/p>\n<pre>$url = <strong>action('PostsController@index');\r\n<\/strong>$url = <strong>action('PostsController@show', ['id' =&gt; 1]);<\/strong><\/pre>\n<p>\u3053\u308c\u304c <code>5.7<\/code> \u304b\u3089\u306f<code>::class<\/code>\u3092\u4f7f\u3063\u3066\u76f4\u63a5\u6307\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<pre>$url = <strong>action([PostsController::class, 'index'])<\/strong>;\r\n$url = <strong>action([PostsController::class, 'show'], ['id' =&gt; 1])<\/strong>;<\/pre>\n<h1>Email Verification\u3067\u672c\u767b\u9332\u30e1\u30fc\u30eb\u3092\u9001\u4fe1\u3059\u308b<\/h1>\n<p>\u3053\u308c\u306f\u524d\u56de\u8a18\u4e8b\u3001<a href=\"https:\/\/blog.capilano-fw.com\/?p=1099\">Laravel 5.7 \u306eEmail Verification\uff08\u672c\u767b\u9332\u30e1\u30fc\u30eb\uff09\u306e\u4f7f\u3044\u65b9<\/a>\u3067\u3001\u8a73\u3057\u304f\u7d39\u4ecb\u3057\u3066\u3044\u308b\u306e\u3067\u305d\u3061\u3089\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<h1>Filesystem\u306b\u30b9\u30c8\u30ea\u30fc\u30e0\u7528\u306e\u30e1\u30bd\u30c3\u30c9\u304c\u8ffd\u52a0\u3055\u308c\u305f<\/h1>\n<p>\u30c6\u30b9\u30c8\u3068\u3057\u3066\u3001<code>storage\/app\/public<\/code>\u306b<code>test_1.zip<\/code>\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u3092\u7528\u610f\u3057\u3001\u3053\u308c\u3092<code>test_2.zip<\/code>\u3068\u3044\u3046\u540d\u524d\u3067\u30ed\u30fc\u30ab\u30eb\uff08\u3064\u307e\u308a\u3001<code>storage\/app<\/code>\u30d5\u30a9\u30eb\u30c0\uff09\u306b\u4fdd\u5b58\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<pre>$stream = \\Storage::disk('public')-&gt;<strong>readStream('test_1.zip')<\/strong>;\r\n\\Storage::disk('local')-&gt;<strong>writeStream('test_2.zip', $stream)<\/strong>;<\/pre>\n<p>\u203b \u5b9f\u969b\u306e\u904b\u7528\u3067\u306f<code>S3<\/code>\u3084<code>SFTP<\/code>\u306a\u3069\u3092\u4f7f\u3046\u3053\u3068\u306b\u306a\u308b\u3067\u3057\u3087\u3046\u3002<\/p>\n<h1>Notification\u306e\u8a00\u8a9e\u3092\u6307\u5b9a\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u305f<\/h1>\n<p>\u30b5\u30f3\u30d7\u30eb\u3068\u3057\u3066\u3001\u65e5\u672c\u8a9e\u74b0\u5883\u3067\u30d5\u30e9\u30f3\u30b9\u8a9e\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u9001\u4fe1\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<code>config\/app.php<\/code>\u306e<code>locale<\/code>\u3092<code>ja<\/code>\u306b\u8a2d\u5b9a\u3057\u3066\u304a\u3044\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h2>\u7ffb\u8a33\u30c7\u30fc\u30bf\u3092\u3064\u304f\u308b<\/h2>\n<p>\u307e\u305a\u3001<code>resources\/lang<\/code>\u5185\u306b\u7ffb\u8a33\u30c7\u30fc\u30bf\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<p>\u3067\u306f\u3001\u4ee5\u4e0b\uff12\u3064\u306e\u30d5\u30a9\u30eb\u30c0\u306b\u305d\u308c\u305e\u308c\u306e\u7ffb\u8a33\u30c7\u30fc\u30bf\u3092\u4f5c\u6210\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><strong>\uff08resources\/lang\/ja\uff09<\/strong><\/p>\n<pre><strong>&lt;?php\r\n\r\nreturn [\r\n    'subject' =&gt; '\u6ce8\u6587\u3092\u53d7\u3051\u4ed8\u3051\u307e\u3057\u305f',\r\n    'details' =&gt; '\u6ce8\u6587\u5185\u5bb9:'\r\n];<\/strong><\/pre>\n<p><strong>\uff08resources\/lang\/fr\uff09<\/strong><\/p>\n<pre><strong>&lt;?php\r\n\r\nreturn [\r\n    'subject' =&gt; 'Nous avons accept\u00e9 votre commande',\r\n    'details' =&gt; 'D\u00e9tails de la commande: '\r\n];<\/strong><\/pre>\n<p>\u30d5\u30a1\u30a4\u30eb\u69cb\u9020\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-1171\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/Screenshot-from-2018-09-07-17-27-56.png\" alt=\"\" width=\"243\" height=\"129\" \/><\/p>\n<h2>Notification\u3092\u5b9f\u88c5\u3059\u308b<\/h2>\n<p><code>Ordered<\/code>\u3068\u3044\u3046\u540d\u524d\u306e<code>Notification<\/code>\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<pre><strong>php artisan make:notification Ordered<\/strong><\/pre>\n<p>\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u305f\u3089\u3001<code>app\/Notifications\/Order.php<\/code>\u3092\u958b\u3044\u3066toMail()\u306e\u4e2d\u8eab\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5909\u66f4\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre>public function toMail($notifiable)\r\n{\r\n<strong>    return (new MailMessage)<\/strong>\r\n<strong>        -&gt;subject(trans('ordered.subject')) \/\/ \u3053\u3053\u304c\u3055\u3063\u304d\u306e\u7ffb\u8a33\u30c7\u30fc\u30bf<\/strong>\r\n<strong>        -&gt;line(trans('ordered.details'));\/\/ \u3053\u3053\u304c\u3055\u3063\u304d\u306e\u7ffb\u8a33\u30c7\u30fc\u30bf<\/strong>\r\n}<\/pre>\n<h2>Notification\u3092\u5b9f\u884c\u3059\u308b<\/h2>\n<p>\u3067\u306f\u3001\u307e\u305a\u306f\u901a\u5e38\u3069\u304a\u308a\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u9001\u4fe1\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre>&lt;?php\r\n\r\nnamespace App\\Http\\Controllers;\r\n\r\nuse App\\Notifications\\Ordered;\r\n\r\nclass HomeController extends Controller\r\n{\r\n    public function notification_localization() {\r\n\r\n        <strong>$user = \\App\\User::first();<\/strong>\r\n<strong>        $user-&gt;notify(new Ordered()); \/\/ \u65e5\u672c\u8a9e\u30e1\u30c3\u30bb\u30fc\u30b8<\/strong>\r\n\r\n    }<\/pre>\n<p>\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u9001\u4fe1\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1173\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/notification_localization_ja.png\" alt=\"\" width=\"521\" height=\"300\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/notification_localization_ja.png 521w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/notification_localization_ja-300x173.png 300w\" sizes=\"auto, (max-width: 521px) 100vw, 521px\" \/><\/p>\n<p>\u203b \u3061\u306a\u307f\u306bHello!\u306a\u3069\u306e\u90e8\u5206\u306f\u3001<code>Notification<\/code>\u306e\u65b9\u3067\u65e5\u672c\u8a9e\u5316\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u8a73\u3057\u304f\u306f\u3001<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>\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u3067\u306f\u3001\u6b21\u306b\u30d5\u30e9\u30f3\u30b9\u8a9e\u3092\u6307\u5b9a\u3057\u3066\u30e1\u30c3\u30bb\u30fc\u30b8\u9001\u4fe1\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre>$user-&gt;notify(\r\n    <strong>(new Ordered())-&gt;locale('fr')<\/strong>\r\n);<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1172\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/notification_localization_fr.png\" alt=\"\" width=\"521\" height=\"302\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/notification_localization_fr.png 521w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/notification_localization_fr-300x174.png 300w\" sizes=\"auto, (max-width: 521px) 100vw, 521px\" \/><\/p>\n<p>\u3046\u307e\u304f\u30d5\u30e9\u30f3\u30b9\u8a9e\u306b\u5207\u308a\u66ff\u308f\u3063\u3066\u30e1\u30c3\u30bb\u30fc\u30b8\u9001\u4fe1\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3057\u305f\u3002<br \/>\n\u3053\u306e\u65b9\u6cd5\u3092\u4f7f\u3048\u3070\u52d5\u7684\u306b<code>Notification<\/code>\u306e\u8a00\u8a9e\u3092\u5207\u308a\u66ff\u3048\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u306d\u3002<\/p>\n<p><strong>\uff082018\u5e7410\u67089\u65e5\u8ffd\u8a18\uff09<\/strong><\/p>\n<p>\u3055\u3089\u306b\u3001Laravel <code>5.7.7<\/code>\u304b\u3089\u306f<code>User<\/code>\u30e2\u30c7\u30eb\u5185\u3067\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u8a00\u8a9e\u3092\u6307\u5b9a\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u3053\u306e\u6a5f\u80fd\u3092\u5229\u7528\u3059\u308b\u306b\u306f\u3001\u307e\u305a<code>users<\/code>\u30c6\u30fc\u30d6\u30eb\u306b\u8a00\u8a9e\u60c5\u5831\u3092\u767b\u9332\u3059\u308b<code>locale<\/code>\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u8ffd\u52a0\u3057\u3066\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u3057\u307e\u3059\u3002<\/p>\n<pre>public function up()\r\n{\r\n    Schema::create('users', function (Blueprint $table) {\r\n        $table-&gt;increments('id');\r\n        $table-&gt;string('name');\r\n        $table-&gt;string('email')-&gt;unique();\r\n        $table-&gt;timestamp('email_verified_at')-&gt;nullable();\r\n        $table-&gt;string('password');\r\n        <strong>$table-&gt;string('locale');<\/strong>\r\n        $table-&gt;rememberToken();\r\n        $table-&gt;timestamps();\r\n    });\r\n}<\/pre>\n<p>\u30c6\u30fc\u30d6\u30eb\u69cb\u6210\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1395\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/users_table_with_locale.png\" alt=\"\" width=\"348\" height=\"602\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/users_table_with_locale.png 348w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/users_table_with_locale-173x300.png 173w\" sizes=\"auto, (max-width: 348px) 100vw, 348px\" \/><\/p>\n<p>\u305d\u3057\u3066\u3001<code>app\/User.php<\/code>\u306b<code>HasLocalePreference<\/code>\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<pre><strong>use Illuminate\\Contracts\\Translation\\HasLocalePreference;<\/strong><\/pre>\n<pre>class User extends Authenticatable implements MustVerifyEmail, <strong>HasLocalePreference<\/strong>\r\n{\r\n    use Notifiable;\r\n\r\n<strong>    public function preferredLocale()<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        return $this-&gt;locale; <\/strong>\/\/ locale\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u8a00\u8a9e\r\n<strong>    }<\/strong>\r\n\r\n    \/\/ \u7701\u7565\r\n\r\n}<\/pre>\n<p>\u4ee5\u4e0a\u3067\u8a2d\u5b9a\u306f\u7d42\u308f\u308a\u3067\u3059\u3002<\/p>\n<p>\u5f8c\u306f\u3001\u8a00\u8a9e\u3092\u308f\u3056\u308f\u3056\u6307\u5b9a\u3057\u306a\u304f\u3066\u3082<code>users<\/code>\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u81ea\u52d5\u7684\u306b\u5bfe\u8c61\u3068\u306a\u308b\u8a00\u8a9e\u306b\u5207\u308a\u66ff\u3048\u3089\u308c\u3066\u901a\u77e5\uff08\u30e1\u30fc\u30eb\u9001\u4fe1\uff09\u3055\u308c\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre><strong>$user-&gt;notify(new Ordered()); <\/strong>\/\/ \u30e6\u30fc\u30b6\u30fc\u3054\u3068\u306e\u8a00\u8a9e\u3067\u9001\u4fe1<\/pre>\n<p>\u203b\u9069\u7528\u3055\u308c\u308b\u306e\u306f\u4ee5\u4e0b\u306e\u8d64\u67a0\u306e\u30c7\u30fc\u30bf\u3067\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1397\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/users_table_with_locale_2.png\" alt=\"\" width=\"262\" height=\"377\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/users_table_with_locale_2.png 262w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/users_table_with_locale_2-208x300.png 208w\" sizes=\"auto, (max-width: 262px) 100vw, 262px\" \/><\/p>\n<p>\u3082\u3061\u308d\u3093\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8a00\u8a9e\u3092\u6307\u5b9a\u3057\u305f\u5834\u5408\u306f\u305d\u3061\u3089\u304c\u512a\u5148\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre>$user-&gt;notify(\r\n    (new Ordered())-&gt;<strong>locale('en') <\/strong>\/\/ \u82f1\u8a9e\u3067\u9001\u4fe1\u3055\u308c\u308b\r\n);<\/pre>\n<h1>\u304a\u308f\u308a\u306b<\/h1>\n<p>\u4eca\u56de\u8ffd\u52a0\u3055\u308c\u305f\u65b0\u3057\u3044\u6a5f\u80fd\u306e\u4e2d\u3067\u5730\u5473\u306b\u52b9\u679c\u3092\u767a\u63ee\u3057\u305d\u3046\u306a\u306e\u304c\u3001\u300c\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u6539\u5584\u300d\u3067\u3059\u306d\u3002<\/p>\n<p>\u3072\u3068\u3064\u306e\u30a8\u30e9\u30fc\u3060\u3051\u306a\u3089\u305d\u308c\u307b\u3069\u6642\u9593\u306e\u77ed\u7e2e\u306b\u306f\u306a\u3089\u306a\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304c\u3001\u3053\u308c\u304c\u4f55\u5341\u3001\u4f55\u767e\u3068\u91cd\u306d\u3066\u3044\u304f\u3068\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u3067\u304d\u308b\u6642\u9593\u3082\u7a4d\u3082\u308a\u7a4d\u3082\u3063\u3066\u5c71\u3068\u306a\u308a\u305d\u3046\u3060\u304b\u3089\u3067\u3059\u3002<\/p>\n<p>\u3042\u3068\u306f\u3001\u3084\u3063\u3071\u308aDump-Server\u3067\u3059\u304b\u306d\u3002<\/p>\n<p>\u5909\u6570\u5185\u306e\u72b6\u6cc1\u3092\u5168\u3066\u78ba\u8a8d\u3067\u304d\u308b\u306e\u3067\u3001\u300c\u3069\u306e\u30c7\u30fc\u30bf\u306e\u3068\u304d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u3066\u3044\u308b\u304b\u300d\u3092\u30c1\u30a7\u30c3\u30af\u3057\u3084\u3059\u304f\u306a\u308b\u306e\u3067\u306f\u306a\u3044\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n<p>\u3055\u3059\u304cLaravel\u3002<br \/>\n\u3053\u308c\u304b\u3089\u3082\u3059\u3070\u3089\u3057\u3044\u4f5c\u54c1\u3092\u697d\u3057\u307f\u306b\u3057\u3066\u3044\u307e\u3059\uff01<\/p>\n<p>\u3067\u306f\u3067\u306f\u301c\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-427 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/04\/24.png\" alt=\"\" width=\"182\" height=\"320\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/04\/24.png 182w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/04\/24-171x300.png 171w\" sizes=\"auto, (max-width: 182px) 100vw, 182px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u524d\u56de\u306e\u8a18\u4e8b\u300cLaravel 5.7 \u306eEmail Verification\uff08\u672c\u767b\u9332\u30e1\u30fc\u30eb\uff09\u306e\u4f7f\u3044\u65b9\u300d\u3067\u306f\u3001\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u305f\u3070\u304b\u308a\u306eLaravel 5.7 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.capilano-fw.com\/?p=1147\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;Laravel 5.7 \u306e\u65b0\u6a5f\u80fd\u307e\u3068\u3081&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":1163,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[82],"class_list":["post-1147","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-laravel","tag-82"],"_links":{"self":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/1147","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=1147"}],"version-history":[{"count":24,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/1147\/revisions"}],"predecessor-version":[{"id":1399,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/1147\/revisions\/1399"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/media\/1163"}],"wp:attachment":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1147"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1147"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1147"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}