mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-28 17:02:04 +03:00
Finished refactor of entity repos
Removed entity-specific repos and standardised the majority of repo calls to be applicable to all entity types
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user