protected function setImage($entity)
    {
        if (method_exists($entity, 'getImage')) {
            $this->image = $entity->getImage();

            return;
        }

        if (isset($entity->image)) {
            $this->image = $entity->image;
        }
    }
protected function setImage($entity)
    {
        if (method_exists($entity, 'getImage')) {
            $this->image = $entity->getImage();

            return;
        }

        if (isset($entity->image)) {
            $this->image = $entity->image;
        }
    }
protected function setImage ( $ entity ) { if ( method_exists ( $ entity , 'getImage' ) ) { $ this -> image = $ entity -> getImage ( ) ; return ; } if ( isset ( $ entity -> image ) ) { $ this -> image = $ entity -> image ; } }
Sets the image of the item.

@param Illuminate\Database\Eloquent\Model
@return void
Sets the image of the item .