Database access details on .env file exposed/vulnerable
Hi,
I set my correct database config at config/database.php file then I run my laravel app
then it says "SQLSTATE[HY000] [1045] Access denied for user 'homestead'@'localhost' (using password: YES)"
I noticed that it uses the db config file on .env file
and when I set my database access to .env file it works but the real problem
lies here the .env is exposed like when I visit http://localhost/laravel/.env it gives visitors the
full details of my database access.
Is there a way to secure it? Or did I missed something?
Any help is highly appreciated.