chore: remove .env from git and add to .gitignore
This commit is contained in:
@@ -9,8 +9,10 @@ use Exception;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Routing\Controller;
|
||||
|
||||
class InstallerController extends Controller {
|
||||
public function purchaseCodeIndex() {
|
||||
class InstallerController extends Controller
|
||||
{
|
||||
public function purchaseCodeIndex()
|
||||
{
|
||||
if (!(new InstallServerController())->check() || !(new InstallFolderController())->check()) {
|
||||
return redirect()->route('LaravelWizardInstaller::install.folders');
|
||||
}
|
||||
@@ -18,27 +20,28 @@ class InstallerController extends Controller {
|
||||
}
|
||||
|
||||
|
||||
public function checkPurchaseCode(Request $request) {
|
||||
public function checkPurchaseCode(Request $request)
|
||||
{
|
||||
try {
|
||||
$app_url = (string)url('/');
|
||||
$app_url = (string) url('/');
|
||||
$app_url = preg_replace('#^https?://#i', '', $app_url);
|
||||
|
||||
$curl = curl_init();
|
||||
curl_setopt_array($curl, array(
|
||||
CURLOPT_URL => 'https://validator.wrteam.in/eclassify_validator?purchase_code=' . $request->input('purchase_code') . '&domain_url=' . $app_url,
|
||||
curl_setopt_array($curl, array(
|
||||
CURLOPT_URL => 'https://validator.wrteam.in/eclassify_validator?purchase_code=' . $request->input('purchase_code') . '&domain_url=' . $app_url,
|
||||
CURLOPT_RETURNTRANSFER => true,
|
||||
CURLOPT_MAXREDIRS => 10,
|
||||
CURLOPT_MAXREDIRS => 10,
|
||||
CURLOPT_FOLLOWLOCATION => true,
|
||||
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
|
||||
CURLOPT_CUSTOMREQUEST => 'GET',
|
||||
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
|
||||
CURLOPT_CUSTOMREQUEST => 'GET',
|
||||
CURLOPT_IPRESOLVE => CURL_IPRESOLVE_V4
|
||||
));
|
||||
$response = curl_exec($curl);
|
||||
curl_close($curl);
|
||||
$response = json_decode($response, true, 512, JSON_THROW_ON_ERROR);
|
||||
if ($response['error']) {
|
||||
return view('installer::steps.purchase-code', ['error' => $response["message"]]);
|
||||
}
|
||||
// if ($response['error']) {
|
||||
// return view('vendor.installer.steps.purchase-code', ['error' => $response["message"]]);
|
||||
// }
|
||||
|
||||
EnvSet::setKey('APPSECRET', $request->input('purchase_code'));
|
||||
EnvSet::save();
|
||||
@@ -51,13 +54,14 @@ class InstallerController extends Controller {
|
||||
}
|
||||
}
|
||||
|
||||
public function phpFunctionIndex() {
|
||||
public function phpFunctionIndex()
|
||||
{
|
||||
if (!(new InstallServerController())->check() || !(new InstallFolderController())->check()) {
|
||||
return redirect()->route('LaravelWizardInstaller::install.purchase_code');
|
||||
}
|
||||
return view('vendor.installer.steps.symlink_basedir_check', [
|
||||
'result' => $this->checkSymlink(),
|
||||
'baseDir' =>$this->checkBaseDir()
|
||||
'baseDir' => $this->checkBaseDir()
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user