我想知道如何在 env() 函数中检索 var ...
/**
* Debug Level:
*
* Production Mode:
* false: No error messages, errors, or warnings shown.
*
* Development Mode:
* true: Errors and warnings shown.
*/
'debug' => filter_var(env('DEBUG', true), FILTER_VALIDATE_BOOLEAN),
现在我正在使用
<?php if(DEBUG == true) { ?>
但这会引发错误
Use of undefined constant DEBUG - assumed 'DEBUG' (this will throw an Error in a future version of PHP)