Palzin Track
Get 15% off with code PTRACKSIGNUP15 

Laravel Diary Logo

Laravel Helper Function: env

The env function in Laravel retrieves the value of an environment variable, returning the value if it exists or a default value if it does not. It supports automatic conversion of boolean string representations and null values to their respective PHP types. Examples are shown using a .env file, demonstrating the function's usage and defaults.