Created
December 20, 2024 16:14
-
-
Save kyledoesdev/73c736046f23586fe1dd269c59c91f51 to your computer and use it in GitHub Desktop.
hasManyThrough.php
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
| public function relationship(): HasManyThrough | |
| { | |
| return $this->hasManyThrough( | |
| // The final model | |
| // The intermediary model | |
| // Foreign key on the intermediary table | |
| // Foreign key on the final table | |
| // Local key on the current table | |
| // Local key on the intermediary table | |
| ); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment