建立 Laravel 本機環境

2021-09-23
作家
Alan_Pan
關鍵字
Laravel
PHP
Apache
  • 將 Laravel 專案 Clone 至本機 Apache 目錄下
  • 設定 Apache 的 VirtualHost

DocumentRoot /var/www/html/example/public
ServerName localhost

  • 清除 Cache

cd /var/www/html/example
php artisan config:clear
php artisan config:cache
chmod -R 755 storage

  • 確認 .env 檔案裡的資料庫連線設定
  • 確認後可透 http://localhost 看到畫面