1,一般修改验证提示信息语言:
resources/lang/cn/validation.php
'custom' => [ 'email' => [ 'required' => '邮箱地址不能为空!', ], ],
2.也可以安装语言包扩展:
composer require "overtrue/laravel-lang:~3.0"
安装成功后,在 config/app.php
文件中将以下这一行:
IlluminateTranslationTranslationServiceProvider::class,
替换为:
OvertrueLaravelLangTranslationServiceProvider::class,
并在config/app.php设置:
<?php return [ . . . 'locale' => 'zh-CN', . . . ];