/** * @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]); }
/** * @return string */ public function getLatestVersion() { return $this->repository->getLatestVersion(); }