users
id
email
password
created_at
updated_at
tasks
id
name
created_at
updated_at
Should I create a pivot table (users_tasks
), or just put a user_id
field within the tasks
table? I'd like to use the Eloquent driver, but I'm not sure which method would be the most appropriate for these kinds of relationships...
Many-to-many relations are a more complicated relationship type. An example of such a relationship is a user with many roles, where the roles are also shared by other users. For example, many users may have the role of "Admin".
From that quote on the Laravel documentation, it stands to reason that in this scenario, there is no need for a pivot table... since each task
is only owned by a single user
... is that the right way of thinking?