thedevdojo / voyager

Voyager - The Missing Laravel Admin
https://voyager.devdojo.com
MIT License
11.78k stars 2.67k forks source link

Different dashboard for different roles? #1747

Open azfar1995 opened 7 years ago

azfar1995 commented 7 years ago

Hi, I want to be able to create different dashboards for different roles for users to be redirected to.

Also, how can I create my own permission similar to "browse_admin", for example I would create another like "browse_editor" for editor role on my app.

lancepioch commented 7 years ago

Labels: question

marktopper commented 7 years ago

You can create your own permission in the database. However, I believe it would be a good idea to have a location to make those in the system itself without having to make changes directly in the database.

azfar1995 commented 7 years ago

However, what would be the correct method of creating different dashboards for different roles and having them redirect upon login.

marktopper commented 7 years ago

Voyager does not support multi instances, so I would go for the same instance, like having an instance of Voyager at /dashboard or maybe even /panel. Here I could overwrite the view to make sure that you only show the content you wish to show for the users with the specific roles.

Voyager does not support that you have one dashboard at /admin and another on /accounting and so on. So to do this you should go along with having just one shared dashboard.