records = $records; return $this; } public function getRecords(): Collection { return $this->records ?? new Collection(); } public function getTotalRecords(): ?int { return $this->getRecords()->count(); } }