コード例 #1
0
ファイル: PagesController.php プロジェクト: ankhzet/Ankh
 /**
  * Display the specified page entity.
  *
  * @param  Page $page
  * @return Response
  */
 public function getRead()
 {
     list($author, $group, $page, $version) = pick_arg(Author::class, Group::class, Page::class, Version::class);
     $exclude = view_excludes(['author' => $author, 'group' => $group]);
     $text = with($version ?: $page->version())->contents();
     if ($text === null) {
         throw new \Exception("Version {$version} not found");
     }
     return $this->viewShow(compact('page', 'text', 'exclude'));
 }
コード例 #2
0
ファイル: GroupsController.php プロジェクト: ankhzet/Ankh
 /**
  * Display the specified group entity.
  *
  * @param  Group $group
  * @return Response
  */
 public function show()
 {
     list($author, $group) = pick_arg(Author::class, Group::class);
     $exclude = view_excludes(['author' => $author]);
     return $this->viewShow(compact('group', 'exclude'));
 }