Added view count tracking with personalised lists

This commit is contained in:
Dan Brown
2015-11-21 17:22:14 +00:00
parent 76eb8fc5d7
commit ea55b7f141
18 changed files with 311 additions and 30 deletions

View File

@ -10,6 +10,7 @@ use BookStack\Http\Requests;
use BookStack\Http\Controllers\Controller;
use BookStack\Repos\BookRepo;
use BookStack\Repos\ChapterRepo;
use Views;
class ChapterController extends Controller
{
@ -79,6 +80,7 @@ class ChapterController extends Controller
{
$book = $this->bookRepo->getBySlug($bookSlug);
$chapter = $this->chapterRepo->getBySlug($chapterSlug, $book->id);
Views::add($chapter);
return view('chapters/show', ['book' => $book, 'chapter' => $chapter, 'current' => $chapter]);
}