Working on setup page

This commit is contained in:
Hillel Coren 2015-03-25 22:00:00 +02:00
parent d773c72970
commit b0421b8321

View File

@ -154,16 +154,12 @@ class AppController extends BaseController
} }
} }
// QUSTION: Does this actually get used???
public function install() public function install()
{ {
if (!Utils::isNinja() && !Utils::isDatabaseSetup()) { if (!Utils::isNinja() && !Utils::isDatabaseSetup()) {
try { try {
// DB Migrate & Seed Artisan::call('migrate', array('--force' => true));
// I Really don't want to do it this way but its the best I've found so far. See Above. Artisan::call('db:seed', array('--force' => true));
$process = new \Symfony\Component\Process\Process('cd ' . base_path() . ' && php artisan migrate --seed');
$process->run();
} catch (Exception $e) { } catch (Exception $e) {
Response::make($e->getMessage(), 500); Response::make($e->getMessage(), 500);
} }
@ -176,12 +172,7 @@ class AppController extends BaseController
{ {
if (!Utils::isNinja()) { if (!Utils::isNinja()) {
try { try {
// DB Migrate & Seed Artisan::call('migrate', array('--force' => true));
// I Really don't want to do it this way but its the best I've found so far. See Above.
$process = new \Symfony\Component\Process\Process('cd ' . base_path() . ' && php artisan migrate');
$process->run();
// Artisan::call('migrate');
Cache::flush(); Cache::flush();
} catch (Exception $e) { } catch (Exception $e) {
Response::make($e->getMessage(), 500); Response::make($e->getMessage(), 500);