I am trying to write a command as a quick start to create a project. The command prompts for database input, and then modifies the .env file. The problem is that the team needs to make some database queries after that, but the .env variables are not reloaded.
My question will be, is there a way to reload or override the current .env variable environments. And if not, is there a way to call another Artisan command again, so do the frame bootstraps again?
In my command, I tried to execute $this->call('build:project')in my actual command, but even in the second call the variables are not reloaded.
Is there a way to achieve this without forcing the user to manually invoke multiple commands?
Thank!
source
share