2019-06-03 11:02:50 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
ini_set('max_execution_time', 300);
|
|
|
|
|
|
|
|
|
|
// array to pass back data
|
2020-12-21 12:42:26 +00:00
|
|
|
$data = [];
|
2019-06-03 11:02:50 +00:00
|
|
|
|
2020-12-21 12:42:26 +00:00
|
|
|
// 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']);
|
2019-06-03 11:02:50 +00:00
|
|
|
|
|
|
|
|
// return a response
|
2020-12-21 12:42:26 +00:00
|
|
|
// return all our data to an AJAX call
|
2019-06-03 11:02:50 +00:00
|
|
|
echo json_encode($data);
|