public static function fromArray(array $list)
{
$collection = new static();
$schema = $collection->getSchema();
$records = array();
foreach ($list as $item) {
$model = $schema->newModel();
$model->setStashedData($item);
$records[] = $model;
}
$collection->setRecords($records);
return $collection;
}