File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,8 @@ public function handle(): int
29
29
30
30
$ this ->installDependency ();
31
31
$ this ->addServicesConfig ();
32
- $ this ->addEnvs ();
32
+ $ this ->addEnvs ('.env ' );
33
+ $ this ->addEnvs ('.env.example ' );
33
34
$ this ->copyView ();
34
35
35
36
$ this ->info ('Social Authentication installed correctly. ' );
@@ -88,22 +89,21 @@ protected function addServicesConfig(): void
88
89
/**
89
90
* Add the needed environment variables.
90
91
*/
91
- protected function addEnvs (): void
92
+ protected function addEnvs (string $ envFile ): void
92
93
{
93
94
if ($ this ->chosenDriver === self ::DRIVER_OTHER ) {
94
95
return ;
95
96
}
96
97
97
- $ envPath = getcwd () . '/.env ' ;
98
+ $ envPath = getcwd () . '/ ' . $ envFile ;
98
99
$ envFile = file_get_contents ($ envPath );
99
100
100
101
// Do not add the entry if already exists
101
102
if (str_contains ($ envFile , 'MAILCARRIER_SOCIAL_AUTH_DRIVER= ' )) {
102
103
return ;
103
104
}
104
105
105
- $ envFile .= PHP_EOL .
106
- 'MAILCARRIER_SOCIAL_AUTH_DRIVER= ' . strtolower ($ this ->chosenDriver ) .
106
+ $ envFile .= 'MAILCARRIER_SOCIAL_AUTH_DRIVER= ' . strtolower ($ this ->chosenDriver ) .
107
107
PHP_EOL .
108
108
$ this ->buildEnvs ();
109
109
You can’t perform that action at this time.
0 commit comments