【筆記】 Laravel 新專案基本設定

laravel new world --jet

cd world

環境設定

    • 設定 env > SQL
    • 設定 config/app.php
      • ‘timezone’ => ‘Asia/Taipei’
      • ‘locale’ => ‘zh_TW’
      • ‘faker_locale’ => ‘zh_TW’
    • npm install
    • npm run dev
    • php artisan vendor:publish –tag=jetstream-views
    • php artisan migrate
    • (選) 安裝翻譯資源 composer require laravel-lang/lang:~8.0
      • 將 /vendor/laravel-lang/lang/src/zh_TW 資料夾複製到 /resources/lang 底下
    • php artisan key:generate
    • php artisan storage:link

 

常用

    • php artisan make:model Post -mcr

 

Cache

    • php artisan optimize:clear
    • php artisan cache:clear
    • php artisan route:clear
    • php artisan config:clear