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
Post a Comment