title: How to set Permissions to write into a .env.local.php file
body: <p>I am writing a setup/quickstart page for my laravel application that allows the user to setup their DB connections. I would like to allow PHP to write a .env.local.php file onto the server, but I'm not sure where to put it, and how to get the permissions to be able to write this file. I would like to avoid setting the entire application to 777 as that probably isn't a good idea, but I'm not sure what I should set it to. Also, what should I set it to after the .env.local.php file has been written?</p>