public function updateDefaultPicture($pictureId)
    {
    	if ($pictureId) {
        	$this->pictures()->update(['default' => false]);
        	$this->pictures()->where('id', $pictureId)->update(['default' => true]);
    	}
    }
public function updateDefaultPicture($pictureId)
    {
    	if ($pictureId) {
        	$this->pictures()->update(['default' => false]);
        	$this->pictures()->where('id', $pictureId)->update(['default' => true]);
    	}
    }
public function updateDefaultPicture ( $ pictureId ) { if ( $ pictureId ) { $ this -> pictures ( ) -> update ( [ 'default' => false ] ) ; $ this -> pictures ( ) -> where ( 'id' , $ pictureId ) -> update ( [ 'default' => true ] ) ; } }
Updates the given product default picture.

@param  integer $pictureId

@return void
Updates the given product default picture .