在一个 Laravel 项目运行的时候提示错误:
The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths.
出现这个错误的原因是什么?
如何对这个错误进行修正。
出现这个错误的原因就是你的项目中缺少 .env 文件。
.env
如果在你的环境中还没有 .env 文件的话,可以拷贝 .env.example 后进行重命名。
.env.example
当你的环境中已经有这个文件后,可以运行下面这个命令来生成 Key
$ php artisan key:generate