I guess you have a Many-To-Many Relationship between "users" and "bookshelves": https://laravel.com/docs/5.2/eloquent-relationships#many-to-many
A user can have many bookshelves, but a bookshelv can also belong to many users. You basically have already expressed this relationship through your "bookshelf_access" table. This is your so called "pivot table".
Now you just need to setup your Eloquent Models as described in the documentation.
If you want different roles and permissions (for example only the creator of the bookshelf can edit the name etc.), you can have a look at different packages, for example:
https://cartalyst.com/manual/sentinel/2.0 https://github.com/Zizaco/entrust https://github.com/romanbican/roles https://github.com/kodeine/laravel-acl
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community