- $pages = $this->pages()->where('chapter_id', '=', 0)->get();
- $chapters = $this->chapters()->get();
- foreach($chapters as $chapter) {
- $pages->push($chapter);
- }
- return $pages->sortBy('priority');
+ $description = $this->description;
+ return strlen($description) > $length ? substr($description, 0, $length-3) . '...' : $description;