Laravel中APP_KEY起什么作用

框架中是这样描述的:
This key is used by the Illuminate encrypter service and should be set to a random, 32 character string, otherwise these encrypted strings will not be safe. Please do this before deploying an application!
也就是这个key是一个随机字符串,用于实现框架中的encrypt(加密)服务,例如存储用户的session,cookie等,从而确保信息安全。可以通过artisan命令将该key更新。

作者:提莫小小队
链接:https://www.jianshu.com/p/4835f210d915
来源:简书
简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处。

在终端上, cd到项目目录位置然后执行:

php artisan key:generate

就可以获得新的APP_KEY了

posted @ 2019-03-15 11:19  泥土里的绽放  阅读(593)  评论(0编辑  收藏  举报