I currently have a pivot table (pending invites) joining a groups table and contacts table. There are 4 columns:
id | group_id | contact_id | email
email field is simply the email id of the contact involved. I have a situation where I need to remove a pending invite when I know the group_id and the corresponding email, but not the contact id. The standard detach function:
$groups->contacts()->detach($contact_id);
requires the contact id to be supplied. Is there a workaround to this?