我有一个自定义CMS,我正在用Laravel从头开始编写,希望在用户设置后从控制器设置env
个值,即数据库详细信息、邮件详细信息、一般配置等,并希望给用户灵活性,使用我正在制作的GUI在移动中更改它们.
So my question is how do I write the values received from user to the .env
file as an when I need from the controller.
And is it a good idea to build the .env
file on the go or is there any other way around it?
提前谢谢您.