No supported encrypter found. The cipher and / or key length are invalid.

配置完了Laravel之后,访问网站出现如下错误:
No supported encrypter found. The cipher and / or key length are invalid.
No supported encrypter found. The cipher and / or key length are invalid.

这是因为要配置config/app.php里面的key的值,这里使用的是配置文件.env中的配置。使用命令php artisan key:generate 会自动生成key,并且加入到.env文件中的APP_KEY的值的位置。

再次访问即可出现欢迎界面!