I'm totally new to the laravel
and vue.js
frameworks. For a school project we have to create an app that uses laravel
for the back-end and vue.js
for the front-end. So I created an API to use it afterwards in my vue.Js
.
But the problem is that when I want to get the data in my Vue.JS it tells me this:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost/lsapp/public/api/posts. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).
I have been struggling since 2 days on it and now, I'm totally lost, I don't know what to do or what goes wrong.. I tried my API into postman and it works perfectly.