*/ public function toArray(Request $request): array { return [ 'id' => $this->id, 'type_id' => $this->type_id, 'type' => $this->whenLoaded('type'), 'cate_id' => $this->cate_id, 'user_id' => $this->user_id, 'title' => $this->title, 'content' => $this->content, 'images' => $this->images, 'file' => $this->file, 'check_status' => $this->check_status, 'check_user' => $this->whenLoaded('checkUser'), 'check_status_text' => $this->check_status_text, 'check_remarks' => $this->check_remarks, 'check_at' => $this->check_at?->format('Y-m-d H:i:s'), 'score' => $this->score, 'created_at' => $this->created_at->format('Y-m-d H:i:s') ]; } }