@Sinnbeck This was just an example to be honest, in reality I want to do it with folders, images and folder_image to know to which folder the image belongs to - in this case it makes more sense?
So if I want to allow users to organize their images in different folders I want a relationship between the folder and the image
But also, I even made a direct user_image relationship (for the original image uploader), So:
@Ligonsker I would probably just add a many to many between users and images, and have the folder be part of the image name :) Each image only has 1 folder anyways
@Sinnbeck By folder I mean a "virtual" folder - not the actual path.
The actual path is a random and permanent path set when using the $file->store() method,
The reason is I want to allow users to create/delete folders in their gallery. So these are virtual folders and what changes is their relationship in the database.
So if a user decides to create a "TripA" folder, he can then move the files there from the "Default" folder, but what actually happens is that I just update the folder_id in the folder_image for example
@Ligonsker I cannot think of an exact scenario where this would be needed, but if it makes sense it your app, then sure go for it :) I assume you are building some sort of file manager?
@Sinnbeck Btw, when you said "I cannot think of an exact scenario where this would be needed" - did you mean that the virtual folders themselves aren't needed(because that was before you knew it's for a file manager and then it's OK)?
Or you meant that even for a file manager it's not the way to do it?