Is it possible to have a hasMany relationship on two columns?
My table has two columns, user_id and related_user_id.
user_id
related_user_id
I want my rela
Compoships adds support for multi-columns relationships in Laravel 5's Eloquent.
It allows you to specify relationships using the following syntax:
public function b() { return $this->hasMany('B', ['key1', 'key2'], ['key1', 'key2']); }
where both columns have to match.