Using .env variables from Laravel inside Vue JS components.
I work mostly with Laravel for backend and Vue for frontend. One day I was working on an Oauth integration and it needed an api key. Sure, I could hard code that, or setup a config.js file to store that in, but that’s just one more place where configuration is needed, one more place future devs might not look when they need to make a change. That just seemed sloppy and messy to me. So I wondered if there’s a way to grab variables from laravel’s .env file and use those inside my Vue components.