*/ public function toArray(Request $request): array { return [ 'id' => $this->resource->id, 'month' => $this->resource->month, 'store' => StoreResource::make($this->whenLoaded('store')), 'actual_performance' => trim_zeros($this->resource->actual_performance), 'expected_performance' => trim_zeros($this->resource->expected_performance), 'status' => $this->resource->task_status, 'created_at' => $this->resource->created_at->timestamp, ]; } }