public function transform(\Closure $callback)
    {
        $this->photos = array_map($callback, $this->photos);

        return $this;
    }
public function transform(\Closure $callback)
    {
        $this->photos = array_map($callback, $this->photos);

        return $this;
    }
public function transform ( \ Closure $ callback ) { $ this -> photos = array_map ( $ callback , $ this -> photos ) ; return $ this ; }
Executes a callback on each photo in the collection
Setting each item to the result from the callback.

@param callable $callback

@return PhotoCollection
Executes a callback on each photo in the collection Setting each item to the result from the callback .