Merge remote-tracking branch 'origin/main' into main
This commit is contained in:
+2
-3
@@ -85,12 +85,11 @@ if(isset($_POST["dbSetup"])){
|
||||
|
||||
file_put_contents($conFilePath, json_encode($dbCon));
|
||||
|
||||
require_once('../bootstrap.php');
|
||||
try{
|
||||
$capsule->Connection()->getPdo();
|
||||
require_once('../bootstrap.php');
|
||||
} catch (\Exception $e) {
|
||||
http_response_code(400);
|
||||
file_put_contents($conFilePath, NULL);
|
||||
http_response_code(400);
|
||||
echo json_encode(["message" => "Could not connect to the database. Please check your configuration. error:" . $e]);
|
||||
exit();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
use Backend\Models\AdminUser;
|
||||
|
||||
require_once ('Database/databaseMigration.php');
|
||||
AdminUser::firstOrCreate([
|
||||
'user_name' => '', 'password' => password_hash('',PASSWORD_DEFAULT)
|
||||
]);
|
||||
Reference in New Issue
Block a user