Commit 0dedfada authored by Adam Brown's avatar Adam Brown

fixed handling times when there is no result

parent cce64d65
......@@ -87,6 +87,8 @@ trait Builder
$names = array_flatten(array_sort(array_unique(array_pluck($collection, 'name'))));
$records = array_flatten(array_sort(array_unique(array_pluck($collection, 'type'))));
$result = [];
foreach ($names as $name) {
foreach ($records as $record) {
$records_array[self::idToRr($record)] = $collection->where('name', $name)->where('type', $record)->pluck('data')->toArray();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment