Laravel .env

From AWVVO
Revision as of 16:56, 18 January 2025 by Admin (talk | contribs) (Created page with "== Get .env variable == <syntaxhighlight lang="php" copy> // .env APP_MY_VAR="xyz" // get value $value = env('APP_MY_VAR', 'default'); </syntaxhighlight>")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Get .env variable

// .env
APP_MY_VAR="xyz"

// get value
$value = env('APP_MY_VAR', 'default');