This pull request fixes an issue where $values was an Eloquent Model instance. However, when it was being converted into a Illuminate Collection, it ended up turning into an array like this:
This array was then passed in as separate items into the ->map which ended up causing issues. By adding an Arr::wrap, single items, like the Model will now be wrapped in an array before going into the Illuminate Collection.
This issue was caused by the refactoring around augmentation in #435.
This pull request fixes an issue where
$values
was an EloquentModel
instance. However, when it was being converted into a IlluminateCollection
, it ended up turning into an array like this:This array was then passed in as separate items into the
->map
which ended up causing issues. By adding anArr::wrap
, single items, like theModel
will now be wrapped in an array before going into the Illuminate Collection.This issue was caused by the refactoring around augmentation in #435.
Fixes duncanmcclean/simple-commerce#1016