How do you protect .env file from public?

Posted 3 years ago by danlito

Hello guys, I am trying to understand how to use this cool feature of. The only thing that i don't get it is how to make this file protected from public.

If i go to mydomain.com/.env i can see all the variables. Is there anyway to hide it?

Thanks

Please sign in or create an account to participate in this conversation.

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up

Channels

Reply to

Use Markdown with GitHub-flavored code blocks.