diff --git a/app/Http/Controllers/InstallController.php b/app/Http/Controllers/InstallController.php index 09cc749..22c1432 100644 --- a/app/Http/Controllers/InstallController.php +++ b/app/Http/Controllers/InstallController.php @@ -3,6 +3,7 @@ namespace App\Http\Controllers; use App\Configuration; +use App\Facade\UserConfig; use App\Helpers\MiscHelper; use App\Http\Requests\StoreUserRequest; use App\User; @@ -155,16 +156,12 @@ class InstallController extends Controller Artisan::call('cache:clear'); Artisan::call('migrate', ['--force' => true]); - $result = Configuration::where('key', 'install_completed')->first(); - if (is_null($result)) - { - $result = new Configuration(); - $result->key = 'install_completed'; - $result->value = true; - $result->save(); - } + $versionNumber = UserConfig::getOrCreateModel('app_version'); + $versionNumber->value = config('app.version'); + $versionNumber->save(); // Now the database is up-to-date, we can enable database sessions + MiscHelper::setEnvironmentSetting('SESSION_DRIVER', 'database'); $request->session()->set('install_stage', 3); return redirect(route('install.administrator'));