Merge branch 'master' of https://gitlab.com/mohit.panjvani/crater-web into auto-update

This commit is contained in:
jayvirsinh_gohil
2019-11-15 14:11:00 +05:30
80 changed files with 19516 additions and 362 deletions

View File

@ -49,12 +49,20 @@ class EnvironmentManager
'DB_PASSWORD='.$request->database_password."\n\n";
if (! $this->checkDatabaseConnection($request)) {
return [
'error' => 'connection_failed'
];
} else {
if(count(DB::connection()->select('SHOW TABLES'))) {
return [
'error' => 'database_should_be_empty'
];
}
}
try {
file_put_contents($this->envPath, str_replace(
$oldDatabaseData,
$newDatabaseData,
@ -101,7 +109,7 @@ class EnvironmentManager
'MAIL_USERNAME='.$request->mail_username."\n".
'MAIL_PASSWORD='.$request->mail_password."\n".
'MAIL_ENCRYPTION='.$request->mail_encryption."\n\n";
// dd($newMailData);
try {
file_put_contents($this->envPath, str_replace(