/** * List of episode chapters * * @see chapter * @accessor */ public function chapters() { $chapters = $this->episode->get_chapters(); if (!$chapters) { return []; } return array_map(function ($chapter) { return new Chapter($chapter); }, $chapters->toArray()); }
/** * List of episode chapters * * @see chapter * @accessor */ public function chapters() { return array_map(function ($chapter) { return new Chapter($chapter); }, $this->episode->get_chapters()->toArray()); }