*/ public function toArray(Request $request): array { return [ 'id' => $this->id, 'title' => $this->title, 'slug' => $this->slug, 'content' => $this->content, 'is_published' => $this->is_published, 'category' => $this->category, 'tags' => ClientTagResource::collection($this->tags()->get()), 'authors' => $this->authors, 'gallery' => $this->images, 'reading_time' => $this->reading_time, 'created_post' => $this->created_at->diffforhumans(), ]; } }