如何在laravel .env文件中评论?

时间:2022-10-18 17:24:00

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.

我正在Laravel的一个项目中工作,我在.env文件设置中存储了一些设置,比如用于测试的参数较少,用于实时工作的参数较少,所以我只是检查是否有任何方法可以对Laravel. env文件进行注释。

Here is an example

这是一个例子

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

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

Thanks in Advance!

提前谢谢!

1 个解决方案

#1


110  

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

文档:https://github.com/vlucas/phpdotenv评论

#1


110  

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

文档:https://github.com/vlucas/phpdotenv评论