mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-29 04:31:08 -04:00
fix environment issue
This commit is contained in:
@ -35,9 +35,9 @@ 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('config:clear');
|
||||||
Artisan::call('migrate --seed');
|
Artisan::call('migrate --seed');
|
||||||
Artisan::call('migrate', ['--path' => 'vendor/laravel/passport/database/migrations']);
|
Artisan::call('migrate', ['--path' => 'vendor/laravel/passport/database/migrations']);
|
||||||
@ -46,12 +46,8 @@ class EnvironmentController extends Controller
|
|||||||
|
|
||||||
Setting::setSetting('profile_complete', 3);
|
Setting::setSetting('profile_complete', 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
return response()->json($results);
|
return response()->json($results);
|
||||||
} catch (Exception $e) {
|
|
||||||
return response()->json([
|
|
||||||
'error' => 'migrate_failed'
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user