installer issue
This commit is contained in:
parent
259fcba157
commit
dc08bbc06e
|
|
@ -55,7 +55,7 @@
|
|||
<label for="type" class="required">{{ __('admin::app.catalog.products.product-type') }}</label>
|
||||
<select class="control" v-validate="'required'" id="type" name="type" {{ $familyId ? 'disabled' : '' }} data-vv-as=""{{ __('admin::app.catalog.products.product-type') }}"">
|
||||
@foreach($productTypes as $key => $productType)
|
||||
<option value="{{ $key }}">{{ $productType['name'] }}</option>
|
||||
<option value="{{ $key }}" {{ $key == $productType['key'] ? 'selected' : '' }}>{{ $productType['name'] }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
|
||||
|
|
|
|||
|
|
@ -82,25 +82,6 @@ $data = array();
|
|||
}
|
||||
}
|
||||
|
||||
// reading env content
|
||||
$str= file_get_contents($envFile);
|
||||
|
||||
// converting env content to key/value pair
|
||||
$data = explode(PHP_EOL,$str);
|
||||
$keyValueData = [];
|
||||
|
||||
if ($data) {
|
||||
foreach ($data as $line) {
|
||||
$rowValues = explode('=', $line);
|
||||
if (count($rowValues) === 2) {
|
||||
$keyValueData[$rowValues[0]] = $rowValues[1];
|
||||
} else if (count($rowValues) > 2) {
|
||||
$eqPos = strpos($line, '=');
|
||||
$keyValueData[substr($line, 0, $eqPos)] = substr($line,$eqPos+1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// inserting form data to empty array
|
||||
$keyValueData['DB_HOST'] = $_POST["host_name"];
|
||||
$keyValueData['DB_DATABASE'] = $_POST["database_name"];
|
||||
|
|
@ -111,6 +92,33 @@ $data = array();
|
|||
$keyValueData['DB_CONNECTION'] = $_POST["database_connection"];
|
||||
$keyValueData['DB_PORT'] = $_POST["port_name"];
|
||||
|
||||
$keyValueData['APP_ENV'] = $_POST["app_env"];
|
||||
$keyValueData['APP_KEY'] = $_POST["app_key"];
|
||||
$keyValueData['APP_DEBUG'] = $_POST["app_debug"];
|
||||
$keyValueData['LOG_CHANNEL'] = $_POST["log_channel"];
|
||||
|
||||
$keyValueData['BROADCAST_DRIVER'] = $_POST["broadcast_driver"];
|
||||
$keyValueData['CACHE_DRIVER'] = $_POST["cache_driver"];
|
||||
$keyValueData['SESSION_DRIVER'] = $_POST["session_driver"];
|
||||
$keyValueData['SESSION_LIFETIME'] = $_POST["session_lifetime"];
|
||||
$keyValueData['QUEUE_DRIVER'] = $_POST["queue_driver"];
|
||||
|
||||
$keyValueData['REDIS_HOST'] = $_POST["redis_host"];
|
||||
$keyValueData['REDIS_PASSWORD'] = $_POST["redis_password"];
|
||||
$keyValueData['REDIS_PORT'] = $_POST["redis_port"];
|
||||
|
||||
$keyValueData['MAIL_DRIVER'] = $_POST["mail_driver"];
|
||||
$keyValueData['MAIL_HOST'] = $_POST["mail_host"];
|
||||
$keyValueData['MAIL_PORT'] = $_POST["mail_port"];
|
||||
$keyValueData['MAIL_USERNAME'] = $_POST["mail_username"];
|
||||
$keyValueData['MAIL_PASSWORD'] = $_POST["mail_password"];
|
||||
$keyValueData['MAIL_ENCRYPTION'] = $_POST["mail_encryption"];
|
||||
|
||||
$keyValueData['PUSHER_APP_ID'] = $_POST["pusher_app_id"];
|
||||
$keyValueData['PUSHER_APP_KEY'] = $_POST["pusher_app_key"];
|
||||
$keyValueData['PUSHER_APP_SECRET'] = $_POST["pusher_app_secret"];
|
||||
$keyValueData['PUSHER_APP_CLUSTER'] = $_POST["pusher_app_cluster"];
|
||||
|
||||
// making key/value pair with form-data for env
|
||||
$changedData = [];
|
||||
foreach ($keyValueData as $key => $value) {
|
||||
|
|
|
|||
|
|
@ -72,6 +72,34 @@
|
|||
placeholder="database password"
|
||||
data-validation="length required" data-validation-length="max50">
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="app_env" value="local">
|
||||
<input type="hidden" name="app_key" value="">
|
||||
<input type="hidden" name="app_debug" value="true">
|
||||
<input type="hidden" name="log_channel" value="stack">
|
||||
|
||||
<input type="hidden" name="broadcast_driver" value="log">
|
||||
<input type="hidden" name="cache_driver" value="file">
|
||||
<input type="hidden" name="session_driver" value="file">
|
||||
<input type="hidden" name="session_lefetime" value="120">
|
||||
<input type="hidden" name="queue_driver" value="sync">
|
||||
|
||||
<input type="hidden" name="redis_host" value="127.0.0.1">
|
||||
<input type="hidden" name="redis_password" value="">
|
||||
<input type="hidden" name="redis_port" value="6379">
|
||||
|
||||
<input type="hidden" name="mail_driver" value="smtp">
|
||||
<input type="hidden" name="mail_host" value="smtp.mailtrap.io">
|
||||
<input type="hidden" name="mail_port" value="2525">
|
||||
<input type="hidden" name="mail_username" value="">
|
||||
<input type="hidden" name="mail_password" value="">
|
||||
<input type="hidden" name="mail_encryption" value="">
|
||||
|
||||
<input type="hidden" name="pusher_app_id" value="">
|
||||
<input type="hidden" name="pusher_app_key" value="">
|
||||
<input type="hidden" name="pusher_app_secret" value="">
|
||||
<input type="hidden" name="pusher_app_cluster" vallue="mt1">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
|
|
@ -112,6 +140,33 @@
|
|||
'user_password' : $('input[name=user_password]').val(),
|
||||
'database_connection' : $("#database_connection" ).val(),
|
||||
|
||||
|
||||
'app_env' : $('input[name=app_env]').val(),
|
||||
'app_key' : $('input[name=app_key]').val(),
|
||||
'app_debug' : $('input[name=app_debug]').val(),
|
||||
'log_channel' : $('input[name=log_channel]').val(),
|
||||
|
||||
'broadcast_driver' : $('input[name=broadcast_driver]').val(),
|
||||
'cache_driver' : $('input[name=cache_driver]').val(),
|
||||
'session_driver' : $('input[name=session_driver]').val(),
|
||||
'session_lifetime' : $('input[name=session_lifetime]').val(),
|
||||
'queue_driver' : $('input[name=queue_driver]').val(),
|
||||
|
||||
'redis_host' : $('input[name=redis_host]').val(),
|
||||
'redis_password' : $('input[name=redis_password]').val(),
|
||||
'redis_port' : $('input[name=redis_port]').val(),
|
||||
|
||||
'mail_driver' : $('input[name=mail_driver]').val(),
|
||||
'mail_host' : $('input[name=mail_host]').val(),
|
||||
'mail_port' : $('input[name=mail_port]').val(),
|
||||
'mail_username' : $('input[name=mail_username]').val(),
|
||||
'mail_password' : $('input[name=mail_password]').val(),
|
||||
'mail_encryption' : $('input[name=mail_encryption]').val(),
|
||||
|
||||
'pusher_app_id' : $('input[name=pusher_app_id]').val(),
|
||||
'pusher_app_key' : $('input[name=pusher_app_key]').val(),
|
||||
'pusher_app_secret' : $('input[name=pusher_app_secret]').val(),
|
||||
'pusher_app_cluster' : $('input[name=pusher_app_cluster]').val(),
|
||||
};
|
||||
|
||||
var target = window.location.href.concat('/EnvConfig.php');
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@
|
|||
$result = $conn->query($sql);
|
||||
|
||||
if ($result) {
|
||||
$installed = true;
|
||||
$installed = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@
|
|||
if ($data) {
|
||||
foreach ($data as $line) {
|
||||
$rowValues = explode('=', $line);
|
||||
|
||||
if (count($rowValues) === 2) {
|
||||
if (in_array($rowValues[0], $databaseArray)) {
|
||||
$key[] = $rowValues[0];
|
||||
|
|
@ -75,4 +74,7 @@
|
|||
} else {
|
||||
return null;
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue