]> BookStack Code Mirror - bookstack/blobdiff - app/Http/Controllers/ChapterController.php
Added testing to favourite system
[bookstack] / app / Http / Controllers / ChapterController.php
index 1d69df2a2f6029e148ff59a4f1bb59f04678d8b0..fbef815821e3bcaacf15cd34b38b4594778f1739 100644 (file)
@@ -1,5 +1,6 @@
 <?php namespace BookStack\Http\Controllers;
 
+use BookStack\Actions\View;
 use BookStack\Entities\Models\Book;
 use BookStack\Entities\Tools\BookContents;
 use BookStack\Entities\Repos\ChapterRepo;
@@ -64,7 +65,7 @@ class ChapterController extends Controller
 
         $sidebarTree = (new BookContents($chapter->book))->getTree();
         $pages = $chapter->getVisiblePages();
-        Views::add($chapter);
+        View::incrementFor($chapter);
 
         $this->setPageTitle($chapter->getShortName());
         return view('chapters.show', [