Support the ongoing development of Laravel.io →
Database Eloquent
Last updated 2 years ago.
0

it is alphabetical so, lesson_user

Docs: http://laravel.com/docs/eloquent#many-to-many

Last updated 2 years ago.
0

Thanks elite123 for pointing me over there.

Strange I've been searching every in the docs and I still miss that.

"Three database tables are needed for this relationship: users, roles, and role_user. The role_user table is derived from the alphabetical order of the related model names, and should have user_id and role_id columns."

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

anja98 anja98 Joined 3 Aug 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.