error update
This commit is contained in:
parent
4ac00af622
commit
3f02668047
|
@ -85,13 +85,12 @@ if(isset($_POST["dbSetup"])){
|
||||||
|
|
||||||
file_put_contents($conFilePath, json_encode($dbCon));
|
file_put_contents($conFilePath, json_encode($dbCon));
|
||||||
|
|
||||||
require_once('../bootstrap.php');
|
|
||||||
try{
|
try{
|
||||||
$capsule->Connection()->getPdo();
|
require_once('../bootstrap.php');
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
http_response_code(400);
|
|
||||||
file_put_contents($conFilePath, NULL);
|
file_put_contents($conFilePath, NULL);
|
||||||
echo json_encode(["message" => "Could not connect to the database. Please check your configuration. error:"]);
|
http_response_code(400);
|
||||||
|
echo json_encode(["message" => "Could not connect to the database. Please check your configuration. error:" . $e]);
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
require_once ('Database/databaseMigration.php');
|
require_once ('Database/databaseMigration.php');
|
||||||
|
|
|
@ -6,3 +6,4 @@ $con = json_decode(file_get_contents('config/database.json', true), true);
|
||||||
$capsule->addConnection($con);
|
$capsule->addConnection($con);
|
||||||
$capsule->setAsGlobal();
|
$capsule->setAsGlobal();
|
||||||
$capsule->bootEloquent();
|
$capsule->bootEloquent();
|
||||||
|
$capsule->Connection()->getPdo();
|
||||||
|
|
Loading…
Reference in New Issue