vue is inside: C:\xampp\htdocs\booking
Laravel api inside: C:\xampp\htdocs\booking-api
FYI: vue application is working on http: // localhost: 8080
If the folder structure is similar to the above, then the application works fine, I can call api like this,
axios.get('http://localhost/booking-api/public/Rooms').then((response)=>this.items = response.data);
But I want a folder booking-apiinside the folder booking. If I put it, and if I call api as shown below,
axios.get('/booking-api/public/Rooms').then((response)=>this.items = response.data);
This will not work, and the console window will be such
Request URL:http://localhost:8080/booking-api/public/Rooms
Request Method:GET
Status Code:404 Not Found
So, how can I place the project apiinside the application vueand how to call api from vue.
source
share