ajout retour en collection, modification des tests en conséquences
This commit is contained in:
@@ -124,7 +124,7 @@ class QueryBuilder
|
||||
$this->columns = ["*"];
|
||||
$data = $this->getData();
|
||||
if (count($data) > 0) {
|
||||
return $this->prepareModels($data)[0];
|
||||
return $this->prepareModels($data)->first();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -172,7 +172,7 @@ class QueryBuilder
|
||||
$model = new Model();
|
||||
$ret[] = $model->setPk($this->pk)->setTable($this->table)->fillData($row);
|
||||
}
|
||||
return $ret;
|
||||
return new Collection($ret);
|
||||
}
|
||||
|
||||
private function getData(): mixed
|
||||
|
||||
Reference in New Issue
Block a user