detach (model) {
    this.guardAgainstInvalidRelation(model)

    const existing = get(this.parent.resource, `data.relationships.${this.key}`, [])

    return this.setRelation(
      existing.filter(rel => rel.id !== model.id)
    )
  }
/**
   * 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 existing = get(this.parent.resource, `data.relationships.${this.key}`, [])
    return this.setRelation(
      existing.filter(rel => rel.id !== model.id)
    )
  }
detach ( model ) { this . guardAgainstInvalidRelation ( model ) const existing = get ( this . parent . resource , ` ${ this . key } ` , [ ] ) return this . setRelation ( existing . filter ( rel => rel . id !== model . id ) ) }
Removes a model from the relationship
 @param model
 @returns {Relation}
Removes a model from the relationship @param model @returns { Relation }