-
PHP Dotenv
Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
Despite having shown how to create a file that loads .env, I don't think it's the best solution, as there are already libraries ready, more robust and much more tested, so if you're just curious to understand how it works, go ahead and create your own, but if you want to create or use it in a professional project I recommend the vlucas/phpdotenv library, so excellent that the laravel framework itself uses and therefore I will show you how to use it.