src/Gzero/Cms/Jobs/UpdateContent.php
protected function handleThumb()
    {
        if ($this->thumbId !== $this->content->thumb_id) {
            if ($this->thumbId === null) {
                return $this->content->thumb()->dissociate();
            }

            $thumb = File::find($this->thumbId);
            if (empty($thumb)) {
                throw new InvalidArgumentException('Thumbnail file does not exist');
            }
            return $this->content->thumb()->associate($thumb);
        }
    }
protected function handleThumb()
    {
        if ($this->thumbId !== $this->content->thumb_id) {
            if ($this->thumbId === null) {
                return $this->content->thumb()->dissociate();
            }

            $thumb = File::find($this->thumbId);
            if (empty($thumb)) {
                throw new InvalidArgumentException('Thumbnail file does not exist');
            }
            return $this->content->thumb()->associate($thumb);
        }
    }
protected function handleThumb ( ) { if ( $ this -> thumbId !== $ this -> content -> thumb_id ) { if ( $ this -> thumbId === null ) { return $ this -> content -> thumb ( ) -> dissociate ( ) ; } $ thumb = File :: find ( $ this -> thumbId ) ; if ( empty ( $ thumb ) ) { throw new InvalidArgumentException ( 'Thumbnail file does not exist' ) ; } return $ this -> content -> thumb ( ) -> associate ( $ thumb ) ; } }
It handles thumb relation

@throws InvalidArgumentException

@return \Illuminate\Database\Eloquent\Model
It handles thumb relation