Hierachy laravel folder storage

I am currently creating an application that allows users to register and collaborate on a project. I used laratrust so that I can integrate roles and permissions. What I would like to do is allow users to create the folder structure as they wish. How can I store this, since each user can have their own folder structure.

+4
source share
1 answer

I will give my 2 cents.

I would create a new table in a database consisting of the following columns with some sample data:

id | project_id | parent_id | name 1 | 1 | null | Main Folder 2 | 1 | 1 | Child Folder 3 | 1 | 2 | Child of Child Folder 4 | 2 | null | Main Folder Hehe 5 | 2 | 4 | Child Folder Hehe

node, , ​​.

, parent_id null, , , , .

, /!

- .

+2

Source: https://habr.com/ru/post/1668435/


All Articles