コード例 #1
0
 /**
  * @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]);
 }
コード例 #2
0
 /**
  * @return string
  */
 public function getLatestVersion()
 {
     return $this->repository->getLatestVersion();
 }