public static function fromString($data) { $collection = Collection::fromString($data); $recs = $collection->records->toArray(); if (!count($recs)) { throw new \ErrorException('Record not found'); } return $recs[0]; }