Laravel 添加中文
2018-11-03 本文已影响0人
AnnaJIAN
composer require overtrue/laravel-lang
config/app.php
.
.
.
'locale' => 'zh-CN',
.
.
.
更新某些request字段
app/Http/Requests/Request.php
public function attributes()
{
return [
'contact_name' => '姓名',
'contact_phone' => '电话',
];
}