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