Skip to content

Commit

Permalink
Added pivot table infos in the belongsToMany call
Browse files Browse the repository at this point in the history
  • Loading branch information
Thombrix committed Nov 25, 2023
1 parent 962fc3f commit 4dccbc5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend-laravel/app/Models/Ville.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ public function canton()

public function langues()
{
return $this->belongsToMany(Langue::class);
return $this->belongsToMany(Langue::class, 'langues_villes', 'ville_id', 'langue_id');
}
}

0 comments on commit 4dccbc5

Please sign in to comment.