I have inherited a Laravel 7.4/ Vue 2.x application. Everyone who knew how to start it up (in theory: successfully) is long gone. I've got everything up and listening without errors until you try to do anything. It's supposed to be setup with the Laravel app listening for /api calls.

import axios from "axios"; let baseURL = ""; switch (process.env.NODE_ENV) { case "development": baseURL = window.location.protocol + "//" + window.location.hostname + "/api"; break; default: baseURL = window.location.protocol + "//" + window.location.hostname + "/api"; } axios.defaults.withCredentials = true; const Api = axios.create({ baseURL, withCredentials: true }); export default Api; Enter fullscreen mode
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners