Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[10.x] BelongsToMany Docblock Improvements #48282

Merged
merged 1 commit into from
Sep 4, 2023

Conversation

crynobone
Copy link
Member

@crynobone crynobone commented Sep 4, 2023

To use none conventional pivot table name you need to define the table name

$this->belongsToMany(Role::class, 'user_role')->using(UserRole::class);

It is already possible to use the following code to archive the same result:

$this->belongsToMany(Role::class, UserRole::class);

@taylorotwell taylorotwell merged commit b2c197e into 10.x Sep 4, 2023
@taylorotwell taylorotwell deleted the belongs-to-many-docblock branch September 4, 2023 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants