All Questions
5 questions
0
votes
0
answers
826
views
load environment variables to the global scope
I am currently using vlucas/phpdotenv to load environment variables in my pure php application. I installed the package with composer then loaded it in the index page like:
//Load Composer's auto ...
-1
votes
1
answer
5k
views
Symfony 5.1.8 ignoring overrides from .env.test / .env.test.local
I have a Symfony 5.1.8 project, in which I want to use a different database connection for testing. To do so, I set up the file .env.test.local with a different value for DATABASE_URL than in my .env....
8
votes
1
answer
7k
views
Laravel Environment Variables(without default value passed in method) not working inside Artisan Command file
I am using Laravel 6.x for client's project wherein I have built an API in the Artisan Command for syncing data.
Now client wants the configuration to be discreet, out of main source code and without ...
0
votes
1
answer
774
views
How to Change the loaded environement in Laravel
I have to .env files .env.local and .env.pro and I don't know how to switch between files, I tried changing config\app.php from
'env' => env('APP_ENV', 'pro'),
to
'env' => env('APP_ENV', '...
6
votes
1
answer
4k
views
Return datatype from .env in Laravel
I want to have dynamic seeders based on my environment. (eg in testing I want so only seed 100 rows, whereas local it would be 10'000).
I've created seeder.php in the config, which is calling values ...