I have Accounts table and Site_links table. When I use this code in Account Model:
public function site_links(){
return $this->belongsToMany($SitelinkModel, 'account_site_link', 'account_id', 'site_link_id')->withTimestamps();
}
The values of the two IDs are reversed.