X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/65796cfc7b7a04f0e61b2ce682c6cfce9d421b23..refs/pull/262/head:/app/Chapter.php diff --git a/app/Chapter.php b/app/Chapter.php index 586ce3fe3..dc23f5ebd 100644 --- a/app/Chapter.php +++ b/app/Chapter.php @@ -18,11 +18,12 @@ class Chapter extends Entity /** * Get the pages that this chapter contains. + * @param string $dir * @return mixed */ - public function pages() + public function pages($dir = 'ASC') { - return $this->hasMany(Page::class)->orderBy('priority', 'ASC'); + return $this->hasMany(Page::class)->orderBy('priority', $dir); } /**