javascript - How to get ENV type Laravel + VueJS + Homestead -


i developing app using laravel + vuejs + homestead , knows on laravel 5.2 have env file can set env variables... in way can access javascript code!

i have read proccess.node_env don't know if got right looks works on npm start no? running app through homestead don't know how it!

thanks in advance!

you dump app_env environment variable page hosting javascript , later access or pass vue.

<script type="text/javascript">     var env = "{{ env }}"; </script> 

and in controller...

$env = getenv("app_env"); 

would value of app_env


Comments

Popular posts from this blog

javascript - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -