Skip to content

Commit

Permalink
Method to get available relationships
Browse files Browse the repository at this point in the history
  • Loading branch information
DivineOmega committed Oct 17, 2018
1 parent b676b2a commit 68222ae
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Apps/PrivateXeroApp.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,18 @@ public function __construct($config)
$this->populateRelationshipToModelMap('PayrollUS', 'payrollUS');
}

/**
* Retrieve a collection of the available relationships.
*
* @return \Illuminate\Support\Collection
*/
public function getAvailableRelationships()
{
$relationships = array_keys($this->relationshipToModelMap);
sort($relationships);
return collect($relationships);
}

/**
* Populate the relationship to model map, for all models within
* a specified model subdirectory.
Expand Down

0 comments on commit 68222ae

Please sign in to comment.