tiger9810 / Laravel-Chirper

0 stars 0 forks source link

Laravelの初期設定 #2

Open tiger9810 opened 1 year ago

tiger9810 commented 1 year ago

ブラウザでアクセスする際のポートを変更する

  1. .envファイルを開いてAPP_PORT=8000を追加する
    APP_NAME=Laravel
    APP_ENV=local
    APP_KEY=base64:TCDRWc3r970WkTGJ55k6kuDFlaclAwOG7iyz8PfhTSU=
    APP_DEBUG=true
    APP_URL=http://localhost
    APP_PORT=8000 //ここに追加する!

    タイムゾーンと言語設定を変更する(参考:Laravelの初期設定)

  2. configディレクトリのapp.phpファイルを開いて、app.phpのタイムゾーンをAsia/Tokyoに変更、言語設定もjaに変更

    /*
    |--------------------------------------------------------------------------
    | 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',
tiger9810 commented 1 year ago

dbコンテナにログイン

docker exec -it chirper-mysql-1 mysql -uroot -p