@@ -34,7 +34,7 @@ public function __construct(Rewrite $writer = null)
3434 $ writer = new Rewrite ();
3535 }
3636 $ this ->writer = $ writer ;
37- $ this ->dir = getcwd () . ' / config ' ;
37+ $ this ->dir = getcwd () . DS . ' config ' ;
3838 }
3939
4040 /**
@@ -44,7 +44,7 @@ public function __construct(Rewrite $writer = null)
4444 */
4545 public function setAppEnv ($ appEnv = 'dev ' )
4646 {
47- file_put_contents (getcwd () . ' / .env ' , 'APP_ENV= ' . $ appEnv );
47+ file_put_contents (getcwd () . DS . ' .env ' , 'APP_ENV= ' . $ appEnv );
4848
4949 return $ this ;
5050 }
@@ -63,7 +63,7 @@ public function copyConfigFileToEnv($files)
6363 foreach ($ files as $ file ) {
6464 $ target = $ this ->filePath ($ file );
6565 if ( ! file_exists ($ target )) {
66- copy ($ this ->dir . ' / ' . $ file . '.php ' , $ target );
66+ copy ($ this ->dir . DS . $ file . '.php ' , $ target );
6767 }
6868 }
6969
@@ -119,7 +119,7 @@ private function writeApp(array $values)
119119 */
120120 public function setAppKey ($ key )
121121 {
122- $ this ->writer ->toFile ($ this ->dir . ' / app.php ' , compact ('key ' ), false );
122+ $ this ->writer ->toFile ($ this ->dir . DS . ' app.php ' , compact ('key ' ), false );
123123 }
124124
125125 /**
@@ -129,8 +129,8 @@ public function setAppKey($key)
129129 */
130130 protected function filePath ($ file )
131131 {
132- $ envPath = $ this ->env === 'prod ' ? '' : $ this ->env . ' / ' ;
133- $ targetDir = $ this ->dir . ' / ' . $ envPath ;
132+ $ envPath = $ this ->env === 'prod ' ? '' : $ this ->env . DS ;
133+ $ targetDir = $ this ->dir . DS . $ envPath ;
134134
135135 if ( ! is_dir ($ targetDir )) {
136136 mkdir ($ targetDir );
0 commit comments