Because of a function naming collision, an exception is raised:
Cannot make static method Illuminate\Database\Eloquent\Model::hydrate() non static in class LakeDawson\Vocal\Vocal
The Illuminate\Database\Eloquent\Model class now has a function hydrate:
<?php
/**
* Create a collection of models from plain arrays.
*
* @param array $items
* @param string $connection
* @return \Illuminate\Database\Eloquent\Collection
*/
public static function hydrate(array $items, $connection = null)
{
$collection = with($instance = new static)->newCollection();
foreach ($items as $item)
{
$model = $instance->newFromBuilder($item);
if ( ! is_null($connection))
{
$model->setConnection($connection);
}
$collection->push($model);
}
return $collection;
}
Because of a function naming collision, an exception is raised: Cannot make static method Illuminate\Database\Eloquent\Model::hydrate() non static in class LakeDawson\Vocal\Vocal
The Illuminate\Database\Eloquent\Model class now has a function hydrate: