public function countBySlug($slug, $bookId) { return $this->page->where('slug', '=', $slug)->where('book_id', '=', $bookId)->count(); }