diff --git a/src/Alias/Model/Repository.php b/src/Alias/Model/Repository.php index 250ab39..3ba812a 100644 --- a/src/Alias/Model/Repository.php +++ b/src/Alias/Model/Repository.php @@ -247,7 +247,7 @@ abstract class Repository implements RepositoryInterface ->from($this->getTable()) ->where(['id = ?']) ->limit(1); - return $this->load($this->getConnection()->execute($query, [$id])->getAsArray()[0]); + return $this->load($this->getConnection()->execute($query, [$id])->getFirstAsArray()); } public function fetchAll(): array {