In laravel 5.8 / vue 2.5 / vuex3.1 I use laracasts/utilities 3 to set parameters from php to javascript. Also I set some params in .env file

REMOTE_SEARCH_WEB = http://external_api

My question is how to send this parameter in resources/js/app.js, as I want to send the parameter in the code below:

alert( "window.REMOTE_SEARCH_WEB::"+(window.REMOTE_SEARCH_WEB) )
import StoreData from './store';
...
const store = new Vuex.Store(StoreData);
const app = new Vue({
    el: '#app',
    router,
    store,
    components:{
        mainapp
    }
});

and to use it inside my store object to get access to remote server.

How can I do this?

Thanks!

0 Answers