Skip to content

Instantly share code, notes, and snippets.

@Makazy
Last active May 5, 2017 10:12
Show Gist options
  • Save Makazy/f971db968aa4f440cce0f59661bc96e7 to your computer and use it in GitHub Desktop.
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
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