$this->id , 'info' => $this->info , 'cycle_number' => $this->cycle_number , 'date' => $this->date , 'result' => $this->result , 'description' => $this->description , 'verified' => $this->verified , 'device_id' => $this->device_id , 'user_id' => $this->user_id , 'test_type_id' => $this->test_type_id , 'test_type' => $this->when( $this->test_type , $this->test_type ) , 'inputs' => $this->when( $this->inputs , $this->inputs ) , 'options' => $this->when( $this->options , $this->options ) , 'device_label' => $this->when( $this->device_label , $this->device_label ) , 'input_values' => $this->when( $this->input_values , $this->input_values ) , 'user' => UserResource::make( $this->whenLoaded( 'user' ) ) , 'files' => MediaResource::collection( $this->media ) , 'thumbnail' => $this->getFirstMediaUrl( 'main_images' , 'thumbnail' ) , 'created_at' => $this->created_at , 'updated_at' => $this->updated_at ]; } }