1234567891011121314151617181920212223242526272829 |
- <?php
- namespace App\Http\Controllers\QuickApp\Book\Transformers;
- use Hashids;
- class ChapterTransformer
- {
- public function transform($chapter){
- return [
- 'bid' => Hashids::encode($chapter->bid),
- //'bid_no_hash' => $chapter->bid,
- 'chapter_id' => $chapter->id,
- 'chapter_name' => $chapter->name,
- 'chapter_sequence' => $chapter->sequence,
- 'chapter_is_vip' => $chapter->is_vip,
- 'chapter_size' => $chapter->size,
- 'prev_cid' => $chapter->prev_cid,
- 'next_cid' => $chapter->next_cid,
- 'recent_update_at' => $chapter->recent_update_at,
- 'chapter_content' => $chapter->content,
- 'sign_status' => $chapter->sign_status,
- 'force_add_desk_type' => $chapter->force_add_desk_type,
- 'next_chapter_status' => $chapter->next_chapter_status,
- 'next_price' => $chapter->next_price,
- 'charge_type' => $chapter->charge_type,
- "force_add_work_wechat_type" => $chapter->force_add_work_wechat_type,
- "force_add_work_wechat_url" => $chapter->force_add_work_wechat_url,
- ];
- }
- }
|