argument('folder'); $json = app_path('SupportedApps/'.$folder.'/app.json'); if(file_exists($json)) { $app = json_decode(file_get_contents($json)); $exists = Application::find($app->appid); if($exists) { $this->error('This app is already registered'); exit; } // Doesn't exist so add it SupportedApps::saveApp($app, new Application); $this->info("Application Added - ".$app->name." - ".$app->appid); } else { $this->error('Could not find '.$json); } } }