public function update()
 {
     Meta::loadPackage('diff');
     $updater = new Updater();
     $repositoryVersion = $updater->getRemoteVersion();
     $hasNewVersion = $updater->hasNewVersion();
     $issueUrl = $updater->newIssueUrl();
     $this->setContent('system.update', compact('repositoryVersion', 'hasNewVersion', 'issueUrl'));
 }
 /**
  * @param Updater $updater
  */
 public function diffFiles(Updater $updater)
 {
     $path = $this->getRequiredParameter('path');
     $localFile = base_path($path);
     if (!is_file($localFile)) {
         throw new Exception("File [{$path}] not found");
     }
     $remoteFileContent = $updater->getRemoteFileContent($path);
     $localFileContent = file_get_contents($localFile);
     $this->setContent(view('cms::system.diff_files', compact('remoteFileContent', 'localFileContent')));
 }
 /**
  * @param Updater $updater
  */
 public function __construct(Updater $updater)
 {
     $this->version = $updater->getRemoteVersion();
     $this->newVersion = $updater->hasNewVersion();
 }