Skip to content

Commit 7675851

Browse files
committed
Added ASK_FOR_VALUE feature
1 parent abbd232 commit 7675851

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,14 @@ This package contains commands to do all the trivial steps you normally do when
66

77
One can create a .default_vars.env in the users home directory with the common .env variables that one alwasy set e.g. MAIL_HOST=127.0.0.1 for Homestead based development environments.
88

9-
It is also possible to specify a specific fiel to beuse by using the --file options.
9+
It is also possible to specify a specific file to be used by using the --file options.
10+
11+
If you ant dynamic vars you can use this:
12+
13+
VAR_NAME=[ASK_FOR_VALUE]
14+
15+
Then you wil be prompted to enter a value
16+
1017
## Installation
1118

1219
You can install the package via composer:

src/Console/Commands/SetEnvCommand.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ public function handle()
7878
{
7979
$newValue = $user_value['value'];
8080

81+
if($newValue == '[ASK_FOR_VALUE]')
82+
{
83+
$newValue = $this->ask("Please ente value for '$user_key'");
84+
}
85+
8186
if($app_env->keyExists($user_key))
8287
{
8388
$this->info("Update $user_key from " . $app_env->getValue($user_key) . " to $newValue");

0 commit comments

Comments
 (0)