This commit is contained in:
rahul shukla 2019-02-12 16:17:29 +05:30
parent e824f4741b
commit 024e78540e
3 changed files with 10 additions and 16 deletions

View File

@ -69,12 +69,12 @@
<div class="content" id="migration-result">
<div class="window" id="migrate">
</div>
<div class="window" id="key">
</div>
<div class="window" id="seed">
</div>
<div class="window" id="publish">
</div>
<div class="window" id="storage">
</div>
<div class="window" id="composer">
</div>
@ -194,11 +194,11 @@
if (data['publish']) {
$('#publish').append('<div class="terminal">' + data['publish'] + '</div>');
}
if (data['storage']) {
$('#storage').append('<div class="terminal">' + data['storage'] + '</div>');
if (data['key']) {
$('#key').append('<div class="terminal">' + data['key'] + '</div>');
}
if ((data['key_results'] == 0) && (data['seeder_results'] == 0) && (data['publish_results'] == 0) && (data['storage_results'] == 0)) {
if ((data['key_results'] == 0) && (data['seeder_results'] == 0) && (data['publish_results'] == 0)) {
$('#continue').show();
$('#migrate-seed').hide();
$('#loader').hide();
@ -207,6 +207,7 @@
} else {
$('#migrate').show();
$('#loader').hide();
$('#migrate-seed').show();
$('#migration-back').show();
if (data['migrate']) {
@ -231,11 +232,4 @@
});
});
</script>
</script>

View File

@ -1,17 +1,15 @@
<?php
// array to pass back data
$data = array();
$data = array();
// run command on terminal
$key = 'cd ../.. && php artisan key:generate 2>&1';
$seeder = 'cd ../.. && php artisan db:seed 2>&1';
$storage = 'cd ../.. && php artisan storage:link 2>&1';
$publish = 'cd ../.. && php artisan vendor:publish 2>&1';
$key_output = exec($key, $data['key'], $data['key_results']);
$seeder_output = exec($seeder, $data['seeder'], $data['seeder_results']);
$storage_output = exec($storage, $data['storage'], $data['storage_results']);
$publish = exec($publish, $data['publish'], $data['publish_results']);
// return a response

View File

@ -82,6 +82,8 @@
echo $requirement->render();
echo $permission->render();
echo $welcome->render();
$storage_output = exec('cd ../.. && php artisan storage:link 2>&1');
} else {
// getting url
$actual_link = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";