vendredi 10 mars 2017

Update .env value via Laravel

Example, if my .env is

APP_ENV=local
APP_URL=http://localhost:8888/
APP_DEBUG=true

I know in Laravel we can do access our .env file by doing this

echo env('APP_ENV'); --> 'local'
echo env('APP_URL'); --> 'http://localhost:8888/'

but I wonder if there is a way to programmatically set it

Ex. env('APP_ENV') == 'production';



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire