detach (model) {
    this.guardAgainstInvalidRelation(model)

    const currentId = get(
      this.parent.resource,
      `data.relationships.${this.key}.data.id`
    )

    if (currentId === model.id) {
      return this.setRelation(null)
    }

    return this
  }
/**
   * Removes a model from the relationship
   * @param model
   * @returns {Relation}
   */
Removes a model from the relationship
@param model
@returns {Relation}
Removes a model from the relationship @param model @returns { Relation }
detach (model) {
    this.guardAgainstInvalidRelation(model)
    const currentId = get(
      this.parent.resource,
      `data.relationships.${this.key}.data.id`
    )
    if (currentId === model.id) {
      return this.setRelation(null)
    }
    return this
  }
detach ( model ) { this . guardAgainstInvalidRelation ( model ) const currentId = get ( this . parent . resource , ` ${ this . key } ` ) if ( currentId === model . id ) { return this . setRelation ( null ) } return this }
Removes a model from the relationship
 @param model
 @returns {Relation}
Removes a model from the relationship @param model @returns { Relation }