public function setPicturesAttribute(array $attr)
    {
        $current = $this->image;
        $image = Images::parse($attr)->on($this->storageFolder());

        if ($image->wantsDeletion()) {
            $image->delete($current);
            return $this->attributes['image'] = null;
        }

        $picture = $image->update($current);

        return $this->attributes['image'] = $picture['path'];
    }
public function setPicturesAttribute(array $attr)
    {
        $current = $this->image;
        $image = Images::parse($attr)->on($this->storageFolder());

        if ($image->wantsDeletion()) {
            $image->delete($current);
            return $this->attributes['image'] = null;
        }

        $picture = $image->update($current);

        return $this->attributes['image'] = $picture['path'];
    }
public function setPicturesAttribute ( array $ attr ) { $ current = $ this -> image ; $ image = Images :: parse ( $ attr ) -> on ( $ this -> storageFolder ( ) ) ; if ( $ image -> wantsDeletion ( ) ) { $ image -> delete ( $ current ) ; return $ this -> attributes [ 'image' ] = null ; } $ picture = $ image -> update ( $ current ) ; return $ this -> attributes [ 'image' ] = $ picture [ 'path' ] ; }
Set the image value of a given model.

@param  array  $attr

@return null|String
Set the image value of a given model .