The
env
function retrieves the value of an environment variable or returns a default value:<?php $env = env('APP_ENV');
$env = env('APP_ENV', 'production');
<?php |
'name' => env('APP_NAME', 'Laravel'),
|--------------------------------------------------------------------------
<?php |
'env' => env('APP_ENV', 'production'),
|--------------------------------------------------------------------------
<?php |
'debug' => (bool) env('APP_DEBUG', false),
|--------------------------------------------------------------------------
<?php |
'url' => env('APP_URL', 'http://localhost'),
|--------------------------------------------------------------------------
<?php |
'timezone' => env('APP_TIMEZONE', 'UTC'),
|--------------------------------------------------------------------------
<?php |
'locale' => env('APP_LOCALE', 'en'),
'fallback_locale' => env('APP_FALLBACK_LOCALE', 'en'),
<?php 'locale' => env('APP_LOCALE', 'en'),
'fallback_locale' => env('APP_FALLBACK_LOCALE', 'en'),
'faker_locale' => env('APP_FAKER_LOCALE', 'en_US'),
<?php 'fallback_locale' => env('APP_FALLBACK_LOCALE', 'en'),
'faker_locale' => env('APP_FAKER_LOCALE', 'en_US'),
|--------------------------------------------------------------------------
<?php 'cipher' => 'AES-256-CBC',
'key' => env('APP_KEY'),
'previous_keys' => [
...array_filter(
<?php 'previous_keys' => [
...array_filter(
explode(',', env('APP_PREVIOUS_KEYS', ''))
),
],
<?php 'maintenance' => [
'driver' => env('APP_MAINTENANCE_DRIVER', 'file'),
'store' => env('APP_MAINTENANCE_STORE', 'database'),
],
<?php 'maintenance' => [
'driver' => env('APP_MAINTENANCE_DRIVER', 'file'),
'store' => env('APP_MAINTENANCE_STORE', 'database'),
],
];
<?php |
'name' => env('APP_NAME', 'Laravel'),
|--------------------------------------------------------------------------
<?php |
'env' => env('APP_ENV', 'production'),
|--------------------------------------------------------------------------
<?php |
'debug' => (bool) env('APP_DEBUG', false),
|--------------------------------------------------------------------------