Skip to content
This repository has been archived by the owner on Jul 16, 2021. It is now read-only.

[Proposal] Add arguments to update belongToMany to not need to use primary key column #184

Closed
evanmalmud opened this issue Aug 31, 2016 · 4 comments

Comments

@evanmalmud
Copy link

Currently when using belongToMany it automatically uses the column that is set as the primary key on the models being used. This should not need to be set to change the columns used. I am proposing adding two new inputs to the method that will let you set the names of the columns for each of the tables.

@Garbee
Copy link

Garbee commented Aug 31, 2016

Can you please provide an example of what the proposed solution would look like for a developer coding it? Also elaborate on what use-cases within your application this would solve?

Thank you.

@bkuhl
Copy link

bkuhl commented Oct 30, 2016

IMO this should be closed since it has gone so long without a response.

@evanmalmud
Copy link
Author

The proposed change would stop the assumption of belongToMany operators. So the belongToMany method would take in more variables that would have defaults and these changes would need to trickle down to any other method being called this way. I am not sure how deep this would go.

@alberto-bottarini
Copy link

It's already merged on 5.5 branch.

laravel/framework#17903

laravel/framework#17915

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants