Skip to content
BigBoxCode
  • Home
  • Fundamental
    • Design Patterns
  • Programming
    • Server-Sent Events(SSE)
  • Database
    • MySQL
    • Redis

Caching

Laravel: env() getting null value when used with config:cache

To avoid this situation, never use env(“ANY_VAR”) directly in your code. Instead, use it like config(“config_file_name.var_name”).

  • Tutorials
  • Design Patterns
  • MySQL Tutorials
  • Redis Tutorials
  • Server-Sent Events(SSE)
  • About
  • Contact
  • Privacy Policy
  • Sitemap
  • Resources
  • GitHub
©2023 BigBoxCode