mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-31 21:51:10 -04:00
Merge branch 'master' of https://gitlab.com/mohit.panjvani/crater-web into auto-update
This commit is contained in:
@ -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(
|
||||
|
||||
Reference in New Issue
Block a user