Step:1 go to in your project and open .htaccess.
![](https://www.devopsschool.com/blog/wp-content/uploads/2020/09/htaccess-step-1-1024x460.png)
Step:2 Then write this code in .htaccess file
<Files .env>
order allow,deny
Deny from all
</Files>
![](https://www.devopsschool.com/blog/wp-content/uploads/2020/09/put-code-in-htaccess-step-2-1024x576.png)
Step:3 After save you have run this code in your terminal
php artisan c:cache
After you can check www.yourproject_name/.env ,Then you will get like this. I hope It will work properly.
![](https://www.devopsschool.com/blog/wp-content/uploads/2020/09/run-this-code-in-url-env-step-3-1024x223.png)
![loading](https://www.devopsschool.com/blog/wp-content/plugins/youtube-embed-plus/images/gallery-page-loader.gif)
![play](https://www.devopsschool.com/blog/wp-content/plugins/youtube-embed-plus/images/playhover.png)
Laravel 5.5 CRUD Tutorial, Introduction And Agenda Overview, Laravel Training Part – 1 DevopsSchool
![loading](https://www.devopsschool.com/blog/wp-content/plugins/youtube-embed-plus/images/gallery-page-loader.gif)
Latest posts by sam (see all)
- AJAX Crud with laravel 5.8 - October 29, 2021
- Upload image in the database with local folder and image send mail. - October 23, 2020
- How to protect .env file in Laravel. - September 10, 2020