I have a doubt as to which 3 tables would do practically the same, Save the urls of where the files are located
I have a table called Groups - where you can save files, in general it's just uploading files. And already in their respective group. (He already does)
Grupo - Archivos
Then in the same Group. There is a task section
Simulando un Classroom
In said group: a Task is published by a teacher Then
He uploads the task, but also uploads Files.
Then I would have another table called
Tareas - ArchivosTareas
Then, when a student wants to upload their assignments, he also needs to upload files .. of whose task. that would be like this
Entrega - ArchivosEntrega
So that's where I have doubts about using that form the relationship, since I do not know if this is optimal. for the same reason, repeat tables with the same objective of saving files.
This is my Design:
I explain my relationships:
a user can create groups, so in the table group, there is a field that says who created whose room.
Then another user, You can register to that group, that's why the pivot table is. To make the relation that a user can be registered to several groups
Then where it says group, it can have many tasks, and it can also have many files
in the task table, you can make many files that a teacher has uploaded. To download the material
Then in files, the relationship goes to users, to say that a user can upload several files.
that is the most revealing in case a doubt arises. because the rest is what I mention, I do not know if I have to make 3 tables for each of the files.
I do not know if this is well done, or that there is a better way to do it!
Since in eloquent
the way to access them is very easy. good to some extent.
Ignore the data that is still missing from my tables as soon as. I just need to understand the relationships of themselves