Top "Phpdotenv" questions

PHP dotenv is a PHP library that loads environment variables from a text file named .env for easy access from PHP code.

Laravel 5 - env() always returns null

I try to find out why my env() helper always returns null. This causes trouble especially in app.php file, …

php laravel environment-variables phpdotenv
What is difference between use env('APP_ENV'), config('app.env') or App::environment() to get app environment?

What is difference between use env('APP_ENV'), config('app.env') or App::environment() to get app environment? I know …

laravel laravel-5 environment-variables phpdotenv
Fatal error: Class 'Dotenv\Dotenv' not found in

Hello guys I am so confused I dont know what I am doing wrong this told me Fatal error: Class …

php namespaces phpdotenv
How to specify a different .env file for phpunit in Laravel 5?

I have a .env file containing my database connection details, as is normal for Laravel 5. I want to override these …

php laravel laravel-5 phpunit phpdotenv
dotenv requires .env file on production

I'm using dotenv for PHP to manage the environment settings (not lavarel but I tagged it because lavarel also uses …

php environment-variables production-environment phpdotenv
Laravel 5.8 , artisan commands error : Failed to parse dotenv file due to an invalid name

This problem only happens with Laravel 5.8 on my shared hosting. It is working fine in my shared hosting with Laravel 5.7. …

shared-hosting laravel-5.8 laravel-artisan phpdotenv
Dotenv must be an instance of Dotenv\Loader

I installed phpdotenv from vlucas using composer on a codeigniter project. I have added the hook as well which I …

php codeigniter codeigniter-3 phpdotenv
Load environment variables from env file with Docker and PHP

How to use dotenv variables set in the Docker file, passed to a Php application? Recently tried to use a ".…

php wordpress docker docker-compose phpdotenv
Use multiple env files

I'm wondering if there's a way in Laravel to specify a set of env files to load. My exact problem …

laravel-5 phpdotenv
Storage path set using .env in Laravel 5.1

I want to configure the storage path in a Laravel 5.1 using the .env file. My bootstrap/app.php looks like …

php laravel laravel-5 phpdotenv