Exemplo n.º 1
0
 public function install()
 {
     if (!Utils::isNinjaProd() && !Utils::isDatabaseSetup()) {
         try {
             Artisan::call('migrate', array('--force' => true));
             if (Industry::count() == 0) {
                 Artisan::call('db:seed', array('--force' => true));
             }
             Artisan::call('optimize', array('--force' => true));
         } catch (Exception $e) {
             Response::make($e->getMessage(), 500);
         }
     }
     return Redirect::to('/');
 }
Exemplo n.º 2
0
 public function install()
 {
     if (!Utils::isNinjaProd() && !Utils::isDatabaseSetup()) {
         try {
             set_time_limit(60 * 5);
             // shouldn't take this long but just in case
             Artisan::call('migrate', array('--force' => true));
             if (Industry::count() == 0) {
                 Artisan::call('db:seed', array('--force' => true));
             }
             Artisan::call('optimize', array('--force' => true));
         } catch (Exception $e) {
             Utils::logError($e);
             return Response::make($e->getMessage(), 500);
         }
     }
     return Redirect::to('/');
 }