CmdrSharp's avatar

Fetching ENV variables for Echo

Hey! I've been toying around with Laravel Echo (https://laracasts.com/series/get-real-with-laravel-echo/episodes/3), and got stuck a bit when Jeffrey mentioned that you could fetch the app key from the environment variables. I did quite a bit of searching, and found nothing on how to actually accomplish this.

Does anyone know? :)

Cheers!

0 likes
1 reply
CmdrSharp's avatar
CmdrSharp
OP
Best Answer
Level 4

Found the solution! The .env variable name actually needs to start with MIX_ to be exposed.

Please or to participate in this conversation.