Last active
May 5, 2017 10:12
-
-
Save Makazy/f971db968aa4f440cce0f59661bc96e7 to your computer and use it in GitHub Desktop.
[Laravel Eloquent Relationships] Métodes de relations entre les models #laravel #eloquent #relationships #hasmany #manytomany #polymorphic
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 targets(){ | |
return $this->hasManyThrough('App\Models\Target', 'App\Models\Throught', 'throught_ref_id', 'target_ref_id', 'local_id'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment