This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// method for a base Model class | |
// | |
/** | |
* Define a has-many-through-pivot relationship. | |
* | |
* @param $related related desired model | |
* @param $through middle model | |
* @param $firstRelation the many-to-many relation we use on the through model | |
* @param $secondRelation the second many-to-many relation on the through table which references farparent |