Maybe I'm too new to this, but on the Configuration page - https://lumen.laravel.com/docs/5.7/configuration#environment-configuration - there's various things that either don't have usage examples or the examples have no context as to where to use them, ie scopes where they'll work or apply.
For instance, it says "All of the variables listed in this file will be loaded into the $_ENV PHP super-global when your application receives a request." but doesn't provide a usage example. It then says "The env function may be used to retrieve the values of your environment variables:"
$debug = env('APP_DEBUG', true);
But doesn't state where this can be used... only in public/index.php or files in that folder? I'm not sure how env() would be available in different classes or folder contexts.
It then says "The current application environment is determined via the APP_ENV variable from your .env file. You may access this value via the environment method on the application instance:"
$environment = app()->environment();
but doesn't state any context... is this "function" just universally available?
I can't tell if the documents are inadequate, or if I'm just supposed to know where these will be used, or I missed something... looking through the folders, I'm just not seeing where these examples would be (most likely?) used.
Sign in to participate in this thread!