コード例 #1
0
 /**
  * @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')));
 }