プロジェクトの設定ファイル config/app.php を編集し,タイムゾーンを Asia/Tokyo
に,言語の設定(ロケール)を ja
に,フェイカ(データベースに投入するテスト用のフェイクデータを生成する仕組み)の言語を ja_JP
に変更します.
config/app.php(抜粋)
/*
|--------------------------------------------------------------------------
| Application Timezone
|--------------------------------------------------------------------------
|
| Here you may specify the default timezone for your application, which
| will be used by the PHP date and date-time functions. We have gone
| ahead and set this to a sensible default for you out of the box.
|
*/
'timezone' => 'Asia/Tokyo',
/*
|--------------------------------------------------------------------------
| Application Locale Configuration
|--------------------------------------------------------------------------
|
| The application locale determines the default locale that will be used
| by the translation service provider. You are free to set this value
| to any of the locales which will be supported by the application.
|
*/
'locale' => 'ja',
/*
|--------------------------------------------------------------------------
| Application Fallback Locale
|--------------------------------------------------------------------------
|
| The fallback locale determines the locale to use when the current one
| is not available. You may change the value to correspond to any of
| the language folders that are provided through your application.
|
*/
'fallback_locale' => 'en',
/*
|--------------------------------------------------------------------------
| Faker Locale
|--------------------------------------------------------------------------
|
| This locale will be used by the Faker PHP library when generating fake
| data for your database seeds. For example, this will be used to get
| localized telephone numbers, street address information and more.
|
*/
'faker_locale' => 'ja_JP',
設定が終われば,git でコミットします.以降も同じように適宜コミットすると良いでしょう.
vagrant@ubuntu2204 comment_app $ git add . ⏎ vagrant@ubuntu2204 comment_app $ git commit -m'config' ⏎ [master f89fec0] config 1 file changed, 3 insertions(+), 3 deletions(-) vagrant@ubuntu2204 comment_app $ git log --oneline ⏎ f89fec0 (HEAD -> master) config 8a3fcaf .env ad7bb34 initial commit vagrant@ubuntu2204 comment_app $