一、报错 No application encryption key has been specified
- 确保
.env
文件存在,- 在
terminal
中使用php artisan key:generate
生成对应的秘钥
二、报错Whoops, looks like something went wrong.
找到config/app.php文件内
'debug' => env('APP_DEBUG', false),改成'debug' => env('APP_DEBUG', true),`
在根据问题的提示解决问题
三、报错SQLSTATE[HY000] [1045] Access denied for user 'homestead'@'localhost' (using password: YES)
数据库连接失败造成
# 找到.ENV文件 DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=homestead DB_USERNAME=homestead DB_PASSWORD=secret # 改成你自己的,比如 DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=test DB_USERNAME=root DB_PASSWORD=root