Laravel keeps settings in two places: the .env file and the config folder.
The .env file
.env holds values that differ between your computer and the live server:
APP_NAME,APP_ENV(localorproduction),APP_URLAPP_DEBUG—trueshows detailed error pages; alwaysfalseon a live site, because error pages can reveal passwords and codeAPP_KEY— used for encryption; generate it withphp artisan key:generateDB_*,MAIL_*,CACHE_*,QUEUE_*settings
Config files
Files in config/ (such as config/app.php, config/database.php) read .env values with env('KEY', 'default').
Reading settings in your code
Use config('app.name') — the file name, then the key. Call env() only inside config files: after php artisan config:cache, env() used elsewhere returns null.
Your own settings
Add a key to a config file, or create a new one like config/site.php, and read it with config('site.whatsapp').
Caching config
On the live server run php artisan config:cache for speed. After changing .env, run it again (or config:clear).
Example
<?php
// .env
// SITE_WHATSAPP=919876543210
// config/site.php
return [
'whatsapp' => env('SITE_WHATSAPP', ''),
'per_page' => 12,
];
// Anywhere in your app (controller, Blade, job):
$number = config('site.whatsapp'); // 919876543210
$perPage = config('site.per_page'); // 12
// Blade: <a href="https://wa.me/{{ config('site.whatsapp') }}">Chat</a>
env() is used only in the config file; the rest of the app calls config(), which keeps working after php artisan config:cache.