Viewing: MagazineResource.php
<?php namespace App\Http\Resources; use Illuminate\Http\Resources\Json\JsonResource; class MagazineResource extends JsonResource { /** * Transform the resource into an array. * * @param \Illuminate\Http\Request $request * @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable */ public function toArray($request) { return [ 'id' => $this->id, 'title' => $this->title, 'cover_image' => $this->cover_image, 'success_journey_title' => $this->success_j_title, 'success_journey_desc' => $this->short_desc, 'interview_cover_image' => $this->interview_image, 'interview_title' => $this->interview_title, 'interview_short_desc' => $this->interview_short_desc, 'life_style_cover_img' => $this->article_image, 'life_style_title' => $this->article_title, 'life_short_desc' => $this->article_short_desc, 'inspiring_image' => $this->inspiring_image, 'inspiring_image' => $this->inspiring_title, 'inspiring_short_desc' => $this->inspiring_short_desc, 'wisdom_talk_image' => $this->wisdom_talk_image, 'wisdom_talk_title' => $this->wisdom_title, 'wisdom_talk_short_desc' => $this->wisdom_short_desc, 'corporate_gallery_image' => $this->corporate_gallery_image, 'corporate_gallery_title' => $this->gallery_title, 'corporate_gallery_short_desc' => $this->gallery_short_desc, 'news_round_up_image' => $this->news_round_up_image, 'news_round_up_title' => $this->roun_up_title, 'news_round_up_short_desc' => $this->roundup_short_desc, 'editor_note_image' => $this->editor_note_image, 'editor_note_short_desc' => $this->note_short_desc, 'magazine_pdf' => $this->magazine_pdf, 'ceo_desk_image' => $this->ceo_desk_image, 'ceo_desk_title' => $this->ceo_desk_title, 'ceo_desk_short_desc' => $this->ceo_short_desc, ]; } }
Return