refs #5: Version number is now saved to the configuration table. Database sessions are enabled once the database is up and running
This commit is contained in:
parent
a41f8bede3
commit
f9bafeb91e
@ -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'));
|
||||
|
Loading…
Reference in New Issue
Block a user