How to add a comment in a Laravel .env file?

< 1 min read

To add a comment in a Laravel .env file, you can use a # Hash.

For example,

# Test Settings
MAIL_MAILER=mailhog
MAIL_HOST=
MAIL_PORT=
MAIL_USERNAME=
MAIL_PASSWORD=
MAIL_ENCRYPTION=

# Live Settings
MAIL_MAILER=sendgrid
MAIL_HOST=
MAIL_PORT=
MAIL_USERNAME=
MAIL_PASSWORD=
MAIL_ENCRYPTION=

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.