sarga/public/installer/Seeder.php

18 lines
546 B
PHP
Raw Normal View History

<?php
2019-01-24 05:33:11 +00:00
// array to pass back data
2019-02-12 10:47:29 +00:00
$data = array();
2019-01-24 05:33:11 +00:00
// run command on terminal
$key = 'cd ../.. && php artisan key:generate 2>&1';
$seeder = 'cd ../.. && php artisan db:seed 2>&1';
2019-03-20 04:59:13 +00:00
$publish = 'cd ../.. && php artisan vendor:publish --all --force 2>&1';
2019-01-24 05:33:11 +00:00
$key_output = exec($key, $data['key'], $data['key_results']);
$seeder_output = exec($seeder, $data['seeder'], $data['seeder_results']);
$publish = exec($publish, $data['publish'], $data['publish_results']);
2019-01-24 05:33:11 +00:00
// return a response
//return all our data to an AJAX call
2019-01-24 05:33:11 +00:00
echo json_encode($data);