$this->id, 'company_name' => $this->company_name, 'cnpj' => $this->cnpj, 'responsible' => $this->responsible, 'email' => $this->email, 'phone' => $this->phone, 'category_id' => $this->category_id, 'category' => $this->whenLoaded('category', fn() => new CategoryResource($this->category)), 'address' => $this->address, 'neighborhood' => $this->neighborhood, 'city' => $this->whenLoaded('city', fn() => new CityResource($this->city)), 'logo' => $this->whenLoaded('logo', fn() => $this->logo?->path ? ['url' => Storage::disk('s3')->temporaryUrl($this->logo->path, now()->addHours(24))] : null), 'discount_percentage' => $this->discount_percentage, 'contract_end' => $this->contract_end?->format('Y-m-d'), 'status' => $this->status, 'created_at' => $this->created_at?->format('Y-m-d H:i:s'), ]; } }