ok
Direktori : /home2/selectio/www/bharath/a1tex.in/app/Http/Controllers/ |
Current File : /home2/selectio/www/bharath/a1tex.in/app/Http/Controllers/UpdateController.php |
<?php namespace App\Http\Controllers; use App\CPU\Helpers; use App\Model\AdminWallet; use App\Traits\ActivationClass; use App\Traits\UpdateClass; use App\User; use App\Model\BusinessSetting; use App\Model\Color; use Brian2694\Toastr\Facades\Toastr; use Illuminate\Http\Request; use Illuminate\Support\Facades\Artisan; use Illuminate\Support\Facades\DB; use Mockery\Exception; class UpdateController extends Controller { use ActivationClass; use UpdateClass; public function update_software_index() { return view('update.update-software'); } public function update_software(Request $request) { Helpers::setEnvironmentValue('SOFTWARE_ID', 'MzE0NDg1OTc='); Helpers::setEnvironmentValue('BUYER_USERNAME', $request['username']); Helpers::setEnvironmentValue('PURCHASE_CODE', $request['purchase_key']); Helpers::setEnvironmentValue('SOFTWARE_VERSION', SOFTWARE_VERSION); Helpers::setEnvironmentValue('APP_MODE', 'live'); Helpers::setEnvironmentValue('APP_NAME', '6valley' . time()); Helpers::setEnvironmentValue('SESSION_LIFETIME', '60'); $data = $this->actch(); try { if (!$data->getData()->active) { return redirect(base64_decode('aHR0cHM6Ly82YW10ZWNoLmNvbS9zb2Z0d2FyZS1hY3RpdmF0aW9u')); } } catch (Exception $exception) { Toastr::error('verification failed! try again'); return back(); } Artisan::call('migrate', ['--force' => true]); $previousRouteServiceProvier = base_path('app/Providers/RouteServiceProvider.php'); $newRouteServiceProvier = base_path('app/Providers/RouteServiceProvider.txt'); copy($newRouteServiceProvier, $previousRouteServiceProvier); Artisan::call('cache:clear'); Artisan::call('view:clear'); Artisan::call('config:cache'); Artisan::call('config:clear'); $this->insert_data_of('13.0'); $this->insert_data_of('13.1'); return redirect(env('APP_URL')); } }