update v1.0.4.2

This commit is contained in:
sujitprasad
2016-01-07 18:47:08 +05:30
parent c65c0cb280
commit 0b8ebb9c70
3 changed files with 112 additions and 84 deletions

18
.env Normal file
View File

@@ -0,0 +1,18 @@
APP_ENV=local
APP_DEBUG=true
APP_KEY=SomeRandomString
DB_HOST=localhost
DB_DATABASE=
DB_USERNAME=
DB_PASSWORD=
CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync
MAIL_DRIVER=smtp
MAIL_HOST=mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null

2
.gitignore vendored
View File

@@ -1,3 +1 @@
/node_modules
.env

View File

@@ -88,6 +88,15 @@ class InstallerApiController extends Controller {
*/
public function config_system(Request $request) {
error_reporting(E_ALL & ~E_NOTICE);
try{
\DB::connection()->getDatabaseName();
// check for database connection
if(\DB::connection()->getDatabaseName()) {
echo "Connected sucessfully to database ".\DB::connection()->getDatabaseName().".";
}
// Check for pre install
if (\Config::get('database.install') == '%0%') {
$firstname = $request->firstname;
@@ -173,5 +182,8 @@ class InstallerApiController extends Controller {
} else {
return ['response'=>'fail','reason'=>'this system is already installed','status'=>'0'];
}
}catch(\Exception $e){
return $e->getMessage();
}
}
}