public function getIndex()
 {
     $books = Book::where('tipus', 'default')->where('konyv_id', '>=', 200)->where('konyv_id', '<', 300)->orderBy('konyv_id')->get()->toArray();
     $firstBookLength = Book::getBookLength('Mt');
     $firstChapterLength = Book::getChapterLength('Mt', 1);
     return View::make('welcome', ['books' => $books, 'currentBook' => 201, 'currentChapter' => 1, 'currentVerse' => 1, 'currentBookLength' => $firstBookLength, 'currentChapterLength' => $firstChapterLength]);
 }
 public function getIndex($bookName = false, $chapter = false, $verse = false)
 {
     if ($bookName) {
         $bookId = Book::where('nev', $bookName)->first()->konyv_id;
     } else {
         $bookId = Input::get('book');
     }
     if (!$chapter) {
         $chapter = Input::get('chapter');
         if (!$chapter) {
             $chapter = 1;
         }
     }
     if (!$verse) {
         $verse = Input::get('verse');
     }
     $words = $this->getChapterText($bookId, $chapter);
     $book = Book::findById($bookId);
     $books = Book::where('tipus', 'default')->orderBy('konyv_id')->get();
     $bookLength = Book::getBookLength($book->nev);
     $chapterLength = Book::getChapterLength($book->nev, $chapter);
     return View::make("text.displayChapter", ["book" => $book, "chapter" => $chapter, "words" => $words, "verse" => $verse, 'books' => $books, 'currentBook' => $book->konyv_id, 'currentChapter' => $chapter, 'currentVerse' => $verse, 'currentBookLength' => $bookLength, 'currentChapterLength' => $chapterLength]);
 }