laravel 访问时出错
No supported encrypter found. The cipher and / or key length are invalid
进入项目目录 ,输入命令
生成配置文件
php artisan key:generate
提示
[ErrorException]
file_get_contents(/Users/wxx/PhpstormProjects/xxlaravel/.env): failed to op
en stream: No such file or directory
提示没有.env文件
进入项目目录
复制.env.example为.env
再次执行
php artisan key:generate
wxx$ php artisan key:generate
Application key [base64:IMm8gHhzpIZA4QwikpUVvjg0fMgPZOgoswgvxZY4IvE=] set successfully.
再次访问对应的路由,正常访问了