mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-05-19 14:41:32 +00:00
Added view count tracking with personalised lists
This commit is contained in:
parent
76eb8fc5d7
commit
ea55b7f141
18 changed files with 311 additions and 30 deletions
app/Http/Controllers
|
@ -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]);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue