コード例 #1
0
 public function show($manual, $version)
 {
     $toc = $this->codex->getToc($manual, $version);
     $search = Request::get('q');
     $results = $this->codex->search($manual, $version, $search);
     $currentManual = $manual;
     $currentVersion = $version;
     $manuals = $this->codex->getManuals();
     $versions = $this->codex->getVersions($manual);
     return View::make('search.show', compact('toc', 'search', 'results', 'currentManual', 'currentVersion', 'manuals', 'versions'));
 }
コード例 #2
0
 /**
  * Show a documentation page.
  *
  * @return Response
  */
 public function show($manual, $version = null, $page = null)
 {
     if (is_null($version)) {
         return Redirect::to(url($manual . '/' . $this->codex->getDefaultVersion($manual)));
     }
     $toc = $this->codex->getToc($manual, $version);
     $content = $this->codex->get($manual, $version, $page ?: 'introduction');
     $lastUpdated = $this->codex->getUpdatedTimestamp($manual, $version, $page ?: 'introduction');
     $currentManual = $manual;
     $currentVersion = $version;
     $manuals = $this->codex->getManuals();
     $versions = $this->codex->getVersions($manual);
     return View::make('codex.show', compact('toc', 'content', 'lastUpdated', 'currentManual', 'currentVersion', 'manuals', 'versions'));
 }