protected function clearPreviousCollection(Collection $collection)
    {
        if ($collection->count()) {
            foreach ($collection as $item) {
                $collection->removeElement($item);
            }
        }
    }
protected function clearPreviousCollection(Collection $collection)
    {
        if ($collection->count()) {
            foreach ($collection as $item) {
                $collection->removeElement($item);
            }
        }
    }
protected function clearPreviousCollection ( Collection $ collection ) { if ( $ collection -> count ( ) ) { foreach ( $ collection as $ item ) { $ collection -> removeElement ( $ item ) ; } } }
Resets previous photo collection

@param Collection $collection
Resets previous photo collection