public function firstOrFail($columns = []) { $record = $this->first($columns); if (!$record) { throw (new ModelNotFoundException())->setQuery($this->getUnescapedQuery(), $this->getDn()); } return $record; }