Logs Added

This commit is contained in:
devansh bawari 2020-12-21 18:12:26 +05:30
parent 803075f303
commit 4c23b777ea
2 changed files with 15 additions and 13 deletions

View File

@ -3,12 +3,12 @@
ini_set('max_execution_time', 300);
// array to pass back data
$data = array();
$data = [];
// run command on terminal
$command = 'cd ../.. && php artisan migrate --force';
$last_line = exec($command, $data['migrate'], $data['results']);
// run command on terminal and asumming that this is as fresh installation
$command = 'cd ../.. && php artisan config:cache && php artisan migrate:fresh --force';
$data['last_line'] = exec($command, $data['migrate'], $data['results']);
// return a response
//return all our data to an AJAX call
// return all our data to an AJAX call
echo json_encode($data);

View File

@ -164,7 +164,7 @@
})
// using the done promise callback
.done(function(data) {
if(data) {
if (data) {
$('#composer-migrate').hide();
if (data['results'] == 0) {
@ -205,8 +205,10 @@
$('#loader').hide();
$('#migrate-seed').hide();
$('#migration-back').hide();
if (data['migrate']) {
$('#install-details').append(data['migrate']);
$('#install-log').show();
}
}
}