예제 #1
0
 public function getIndex()
 {
     $builds = Build::where('is_published', '=', '1')->orderBy('updated_at', 'desc')->take(5)->get();
     $modversions = Modversion::whereNotNull('md5')->orderBy('updated_at', 'desc')->take(5)->get();
     $rawChangeLog = UpdateUtils::getLatestChangeLog();
     $changelogJson = array_key_exists('error', $rawChangeLog) ? $rawChangeLog : array_slice($rawChangeLog, 0, 10);
     return View::make('dashboard.index')->with('modversions', $modversions)->with('builds', $builds)->with('changelog', $changelogJson);
 }
예제 #2
0
 public function getUpdate()
 {
     $rawChangeLog = UpdateUtils::getLatestChangeLog();
     $changelog = array_key_exists('error', $rawChangeLog) ? $rawChangeLog : array_slice($rawChangeLog, 0, 10);
     $latestCommit = array_key_exists('error', $rawChangeLog) ? $rawChangeLog : $rawChangeLog[0];
     $rawLatestVersion = UpdateUtils::getLatestVersion();
     $latestVersion = array_key_exists('error', $rawLatestVersion) ? $rawLatestVersion : $rawLatestVersion['name'];
     $latestData = array('version' => $latestVersion, 'commit' => $latestCommit);
     return View::make('solder.update')->with('changelog', $changelog)->with('currentVersion', SOLDER_VERSION)->with('latestData', $latestData);
 }