$this->id, 'name' => $this->name, 'cpf' => $this->cpf, 'registration' => $this->registration, 'photo_url' => $this->photo_path ? Storage::disk('s3')->temporaryUrl($this->photo_path, now()->addHours(24)) : null, 'expiry_date' => $this->expiry_date?->format('d/m/Y'), 'dependents' => $this->dependents->map(function ($dependent) { return [ 'id' => $dependent->id, 'name' => $dependent->name, 'kinship' => $dependent->kinship, 'status' => $dependent->status, 'expiry_date' => $this->expiry_date?->format('d/m/Y'), ]; })->values(), ]; } }