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

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners