]> BookStack Code Mirror - bookstack/blobdiff - app/Http/Controllers/BookController.php
Added migration file.
[bookstack] / app / Http / Controllers / BookController.php
index d515d83a3ac921a19fa98e6752aa1e61222eabe5..b6175d8591e5ec6ee1a586c21b2e2517f9c19755 100644 (file)
@@ -40,12 +40,14 @@ class BookController extends Controller
         $recents = $this->signedIn ? $this->entityRepo->getRecentlyViewed('book', 4, 0) : false;
         $popular = $this->entityRepo->getPopular('book', 4, 0);
         $new = $this->entityRepo->getRecentlyCreated('book', 4, 0);
+        $booksViewType = $this->currentUser->books_view_type;
         $this->setPageTitle('Books');
         return view('books/index', [
             'books' => $books,
             'recents' => $recents,
             'popular' => $popular,
-            'new' => $new
+            'new' => $new, 
+            'booksViewType' => $booksViewType
         ]);
     }