Laravel dev reminder: don't use env() directly in your application code.

Put it in your config, then use config() everywhere else.

Why?

Once you run php artisan config:cache, Laravel doesn't load the .env file during requests.

Pest and Larastan can even help enforce this rule.
image

  • No matching results...
  • Searching...

/ 1000