Skip to content

Commit

Permalink
alias for relations
Browse files Browse the repository at this point in the history
  • Loading branch information
sunel committed Dec 5, 2018
1 parent 87dcd06 commit ef6128c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/AttributeSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ public function attributes()
return $this->hasManyThrough(Attribute::class, EntityAttribute::class, 'attribute_set_id', 'attribute_id');
}

/**
* @alias attributeGroup()
*/
public function groups()
{
return $this->attributeGroup();
}

/**
* Define a one-to-many relationship for attribute group.
*
Expand Down
8 changes: 8 additions & 0 deletions src/Entity.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,14 @@ public function getEntityTableName()
}
return $tableName;
}

/**
* @alias attributeSet()
*/
public function sets()
{
return $this->attributeSet();
}

/**
* Define a one-to-many relationship for attribute set.
Expand Down

0 comments on commit ef6128c

Please sign in to comment.