title: Setup .env file by CI4 controller
body: <p>im new in CI4 i would like to create setup database by CI4 it is possible write db connection data to .env file by controller or some services CI4? 
  Also want when complete setup change environment in .env that user cant access setup.
  If its not correct solution can some one tell how to do it best way?</p>
  
  <p>im using CI 4.0.2</p>