-
- protected $baseRepo;
-
- /**
- * ChapterRepo constructor.
- */
- public function __construct(BaseRepo $baseRepo)
- {
- $this->baseRepo = $baseRepo;
- }
-
- /**
- * Get a chapter via the slug.
- * @throws NotFoundException
- */
- public function getBySlug(string $bookSlug, string $chapterSlug): Chapter
- {
- $chapter = Chapter::visible()->whereSlugs($bookSlug, $chapterSlug)->first();
-
- if ($chapter === null) {
- throw new NotFoundException(trans('errors.chapter_not_found'));
- }
-
- return $chapter;
+ public function __construct(
+ protected BaseRepo $baseRepo,
+ protected EntityQueries $entityQueries,
+ protected TrashCan $trashCan,
+ ) {