diff --git a/app/Http/Resources/PlantHarvestResource.php b/app/Http/Resources/PlantHarvestResource.php index 88cbaa2..69d0b3b 100644 --- a/app/Http/Resources/PlantHarvestResource.php +++ b/app/Http/Resources/PlantHarvestResource.php @@ -21,7 +21,7 @@ class PlantHarvestResource extends JsonResource 'director' => $this->director, 'area' => $this->area, 'output' => $this->output, - 'harvest_at' => $this->harvest_at ? $this->harvest_at->timestamp : '', + 'harvest_at' => $this->harvest_at ? $this->harvest_at->timestamp : null, ]; } } diff --git a/app/Http/Resources/RegionPlantResource.php b/app/Http/Resources/RegionPlantResource.php index 9ec2393..ad6b1d5 100644 --- a/app/Http/Resources/RegionPlantResource.php +++ b/app/Http/Resources/RegionPlantResource.php @@ -19,8 +19,8 @@ class RegionPlantResource extends JsonResource 'plant_name' => $this->plant_name, 'director' => $this->director, 'area' => $this->area, - 'start_at' => $this->start_at ? $this->start_at->timestamp : '', - 'end_at' => $this->end_at ? $this->end_at->timestamp : '', + 'start_at' => $this->start_at ? $this->start_at->timestamp : null, + 'end_at' => $this->end_at ? $this->end_at->timestamp : null, 'plant_state' => $this->plant_state, ]; }