orchestral / testbench

Laravel Testing Helper for Packages Development
https://packages.tools/testbench
MIT License
2.1k stars 136 forks source link

Load env variables in workbench #418

Closed xusimr97 closed 6 days ago

xusimr97 commented 6 days ago

I'm trying to load environment variables from my .env file, but I'm encountering issues. The only way it works is by hardcoding the variables in the env attribute within testbench.yaml.

However, I prefer not to hardcode the environment variables in that file. Is there a way to automatically load the environment variables from the .env file located in my package's workbench folder?

I've also attempted loading the variables through a service provider, but that approach didn't work either.

crynobone commented 6 days ago

add the environment file to workbench/.env and you can opt for .env.example or .env.dist too