You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All of the variables listed in the `.env` file will be loaded into the `$_ENV` PHP super-global when your application receives a request. However, you may use the `env`helper to retrieve values from these variables in your configuration files. In fact, if you review the Laravel configuration files, you will notice many of the options are already using this helper:
84
+
All of the variables listed in the `.env` file will be loaded into the `$_ENV` PHP super-global when your application receives a request. However, you may use the `env`function to retrieve values from these variables in your configuration files. In fact, if you review the Laravel configuration files, you will notice many of the options are already using this function:
85
85
86
86
'debug' => env('APP_DEBUG', false),
87
87
@@ -112,14 +112,14 @@ You may also pass arguments to the `environment` method to determine if the envi
112
112
<aname="accessing-configuration-values"></a>
113
113
## Accessing Configuration Values
114
114
115
-
You may easily access your configuration values using the global `config`helper function from anywhere in your application. The configuration values may be accessed using "dot" syntax, which includes the name of the file and option you wish to access. A default value may also be specified and will be returned if the configuration option does not exist:
115
+
You may easily access your configuration values using the global `config` function from anywhere in your application. The configuration values may be accessed using "dot" syntax, which includes the name of the file and option you wish to access. A default value may also be specified and will be returned if the configuration option does not exist:
116
116
117
117
$value = config('app.timezone');
118
118
119
119
// Retrieve a default value if the configuration value does not exist...
120
120
$value = config('app.timezone', 'Asia/Seoul');
121
121
122
-
To set configuration values at runtime, pass an array to the `config`helper:
122
+
To set configuration values at runtime, pass an array to the `config`function:
0 commit comments