Virtual Box Ubuntu, Laravel backend api, Vue frontend - can't connect Vue to Laravel api url -


i have virtualbox machine on windows 10, have laravel backend api, , vue frontend. when run vue npm run dev, starts vue app on localhost port 8080, , laravel app on vue.dev/api/quote (this post url)

i using axios , when in axios.post put laravel url, getting errors in browser console.

axios.post('http://vue.dev/api/quote',                     {content: this.quotecontent})                     .then(                         (response) => console.log(response)                     )                     .catch(                         (error) => console.log(error)                     ); 

i can access on ubuntu laravel url , works. cant find problem in vue, because when hit submit button on vue app, keep getting error.

enter image description here


Comments

Popular posts from this blog

Sort a complex associative array in PHP -

vb.net - How to ignore if a cell is empty nothing -

recursion - Can every recursive algorithm be improved with dynamic programming? -