Welcome Guest, Not a member yet? Register   Sign In
Reload .env file in runtime
#1

hi..
is it possible to reload the .env in runtime?
or is there a function I can use to reload the .env?

i have create new command in spark to installation my project,
with extend class BaseCommand.

i create function to generate  .env file with the value from input CLI .
before generate i validation that, include checking connection DB,table exist..etc  n i use value from CLI.

when the input valid  then i generate the .env file with that value.


the problem is  when i generate the .env in runtime, 
its cant change the first load value,  before i generate that.

a new .env can be read after the second load.
i must stop the CLI n run command again..

i want to automaticly read the env in global after i generate that.
so i can run the others command, like migration,seed automaticly after i generate the env...

can i do that?

thanks before..
Reply


Messages In This Thread
Reload .env file in runtime - by dhiya as - 08-24-2024, 12:19 AM
RE: Reload .env file in runtime - by kenjis - 08-24-2024, 07:45 PM
RE: Reload .env file in runtime - by dhiya as - 08-25-2024, 12:07 AM
RE: Reload .env file in runtime - by kenjis - 08-25-2024, 02:17 AM
RE: Reload .env file in runtime - by kenjis - 08-25-2024, 02:21 AM
RE: Reload .env file in runtime - by dhiya as - 08-25-2024, 03:48 AM



Theme © iAndrew 2016 - Forum software by © MyBB