Reputation: 652
I have to models User & Article
User can like Article & User can bookmark article
if i create a pivot than it will be same for both user_article pivot
Can any one help ?
Upvotes: 1
Views: 1192
Reputation: 163898
Just define another relationship in these models and add custom pivot table name:
public function anotherRelationship()
{
return $this->belongsToMany('App\Article', 'another_pivot_table_name');
}
Upvotes: 3