BookStack\Http\Controllers\ChapterController::show PHP Method

show() public method

Display the specified chapter.
public show ( $bookSlug, $chapterSlug ) : Response
$bookSlug
$chapterSlug
return Response
    public function show($bookSlug, $chapterSlug)
    {
        $book = $this->bookRepo->getBySlug($bookSlug);
        $chapter = $this->chapterRepo->getBySlug($chapterSlug, $book->id);
        $this->checkOwnablePermission('chapter-view', $chapter);
        $sidebarTree = $this->bookRepo->getChildren($book);
        Views::add($chapter);
        $this->setPageTitle($chapter->getShortName());
        $pages = $this->chapterRepo->getChildren($chapter);
        return view('chapters/show', ['book' => $book, 'chapter' => $chapter, 'current' => $chapter, 'sidebarTree' => $sidebarTree, 'pages' => $pages]);
    }