title: Update .env value via Laravel
body: <p>Example, if my <strong>.env</strong> is </p>
  
  <pre><code>APP_ENV=local
  APP_URL=http://localhost:8888/
  APP_DEBUG=true
  FACEBOOK_APP_ID = ABC
  </code></pre>
  
  <p>I know in Laravel we can do access our .env file by doing this  </p>
  
  <pre><code>echo env('APP_ENV'); --&gt; 'local'
  echo env('APP_URL'); --&gt; 'http://localhost:8888/'
  </code></pre>
  
  <p>but I wonder if there is a way to programmatically set it </p>
  
  <pre><code>Ex. env('APP_ENV') == 'production';
  </code></pre>