mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-28 12:11:08 -04:00
fix environment issue
This commit is contained in:
@ -35,23 +35,19 @@ class EnvironmentController extends Controller
|
|||||||
{
|
{
|
||||||
$results = $this->EnvironmentManager->saveDatabaseVariables($request);
|
$results = $this->EnvironmentManager->saveDatabaseVariables($request);
|
||||||
|
|
||||||
try {
|
|
||||||
|
|
||||||
if(array_key_exists("success", $results)) {
|
if(array_key_exists("success", $results)) {
|
||||||
Artisan::call('config:clear');
|
|
||||||
Artisan::call('migrate --seed');
|
|
||||||
Artisan::call('migrate', ['--path' => 'vendor/laravel/passport/database/migrations']);
|
|
||||||
|
|
||||||
\Storage::disk('local')->put('database_created', 'database_created');
|
Artisan::call('config:clear');
|
||||||
|
Artisan::call('migrate --seed');
|
||||||
|
Artisan::call('migrate', ['--path' => 'vendor/laravel/passport/database/migrations']);
|
||||||
|
|
||||||
Setting::setSetting('profile_complete', 3);
|
\Storage::disk('local')->put('database_created', 'database_created');
|
||||||
}
|
|
||||||
return response()->json($results);
|
Setting::setSetting('profile_complete', 3);
|
||||||
} catch (Exception $e) {
|
|
||||||
return response()->json([
|
|
||||||
'error' => 'migrate_failed'
|
|
||||||
]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return response()->json($results);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user