/** * 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')); }
/** * 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')); }