*/ public function toArray(Request $request): array { return [ 'id' => $this->id, 'check_id' => $this->check_id, 'batch_id' => $this->batch_id, 'check_type' => $this->check_type, 'check_value' => $this->check_type, 'check_name' => $this->check_name, 'check_user_id' => $this->check_user_id, 'checked_at' => $this->checked_at?->timestamp, 'checked_format' => $this->checked_at?->format('Y-m-d H:i:s'), 'remarks' => $this->remarks, 'check_status' => $this->check_status, 'check_status_text' => $this->check_status->text(), 'sort' => $this->sort, 'check' => WorkflowCheckResource::make($this->whenLoaded('check')), 'check_user' => EmployeeResource::make($this->whenLoaded('checkUser')), ]; } }