Trying to add array to a laravel object with ->push on the object however it is not working. What do I appear to be doing wrong? The object is unchanged.
$cottages = Cottage::all();
foreach ($cottages as $cottage) {
//returns array
$gallery = $this->getCottageGallery($cottage['folder']);
//should append to $cottage object
$cottage->push($gallery);
}
dump($cottages);