protected function updateModel($imagePath, $imageFieldName)
    {
        $this->attributes[$imageFieldName] = $imagePath;

        $dispatcher = $this->getEventDispatcher();
        self::unsetEventDispatcher();
        $this->save();
        self::setEventDispatcher($dispatcher);
    }
protected function updateModel($imagePath, $imageFieldName)
    {
        $this->attributes[$imageFieldName] = $imagePath;

        $dispatcher = $this->getEventDispatcher();
        self::unsetEventDispatcher();
        $this->save();
        self::setEventDispatcher($dispatcher);
    }
protected function updateModel ( $ imagePath , $ imageFieldName ) { $ this -> attributes [ $ imageFieldName ] = $ imagePath ; $ dispatcher = $ this -> getEventDispatcher ( ) ; self :: unsetEventDispatcher ( ) ; $ this -> save ( ) ; self :: setEventDispatcher ( $ dispatcher ) ; }
update the model field

@param $imagePath
@param $imageFieldName
update the model field