public function firstRecord() { if (!empty($this->records)) { return $this->records[0]; } throw new \RuntimeException('There is no records'); }