Complete the code to load environment variables in Laravel.
Dotenv::createImmutable(__DIR__)->[1]();The load() method loads the environment variables from the .env file.
Complete the code to get the value of APP_ENV from environment variables.
$environment = env('[1]', 'production');
The env() helper fetches the value of the environment variable named APP_ENV.
Fix the error in the code to correctly set the database host from environment variables.
'host' => env('[1]', '127.0.0.1'),
The correct environment variable for the database host is DB_HOST.
Fill both blanks to set the mail driver and mail host from environment variables.
'driver' => env('[1]', 'smtp'), 'host' => env('[2]', 'smtp.mailtrap.io'),
Older Laravel versions use MAIL_DRIVER for mail driver, and MAIL_HOST for mail host.
Fill all three blanks to set cache driver, queue connection, and session driver from environment variables.
'cache' => env('[1]', 'file'), 'queue' => env('[2]', 'sync'), 'session' => env('[3]', 'file'),
These are the standard environment variable names for cache, queue, and session drivers in Laravel.