If you have multiple folder on live/development server for demo purpose and you want to hide .env and package file then use below code.
Create .htaccess file in root folder and past below code:
# Disable index view
Options -Indexes # Hide a specific file
<Files “.*”>
Order allow,deny
Deny from all
</Files>
<Files “package.*”>
Order allow,deny
Deny from all
</Files>