How to comment in laravel .env file?

2019-02-02 19:05发布

I am working on a project in Laravel where I am storing some settings in .env file setting like few parameters for testing purpose and few parameters are for live working so I was just checking that is there any way to comment in .env file of Laravel.

Here is an example

/* Test Settings */
ACCESS_KEY=qwsdr
ACCESS_TOKEN=Bgcvfsx

/* Live Settings */
ACCESS_KEY=985AsdefG
ACCCESS_TOKEN=LFP994kL

Thanks in Advance!

2条回答
虎瘦雄心在
2楼-- · 2019-02-02 19:38

You use hash commenting:

# Test Settings
ACCESS_KEY=qwsdr
ACCESS_TOKEN=Bgcvfsx

# Live Settings
ACCESS_KEY=985AsdefG
ACCCESS_TOKEN=LFP994kL

Documentation: https://github.com/vlucas/phpdotenv#comments

查看更多
欢心
3楼-- · 2019-02-02 19:46
#Database Connection 
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=your db name
#DB_USERNAME=server username
#DB_PASSWORD=server password
查看更多
登录 后发表回答