/**
  * @param $version
  * @param $package
  * @param $page
  *
  * @return \Illuminate\View\View
  */
 public function show($version, $package, $page)
 {
     if ($version === 'current') {
         $version = $this->repository->getLatestVersion();
     }
     $content = $this->repository->findForVersion($version, $package, $page);
     if (!$content) {
         throw new NotFoundHttpException();
     }
     $title = $this->getPageTitle($content);
     $index = $this->repository->getIndex($version, $package);
     return view('docs', ['version' => $version, 'package' => $package, 'page' => $page, 'title' => $title, 'content' => $content, 'index' => $index]);
 }
 /**
  * @param $version
  * @param $package
  *
  * @return array
  */
 public function getIndex($version, $package)
 {
     return $this->cache->remember($version . $package . 'index', 60, function () use($version, $package) {
         return $this->repository->getIndex($version, $package);
     });
 }
 /**
  * @param $version
  * @param $package
  *
  * @return array
  */
 public function getIndex($version, $package)
 {
     $content = $this->repository->getIndex($version, $package);
     return $this->converter->text($content);
 }