Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Meracle's avatar

Two or more different group of user and two different dashboards.

Hello folks. I wanna create a project with two types of Users or maybe three. The first group is Global Admin who can make everything. The second group would be something like Teachers, and the third is single Users (students). Should I keep them in one table or two/three different?

I want to redirect Global Admin and Teachers to managment system especially maked for them, and Students for another page (single timeline with news).

How to prepare a table, how many tables and how to separate the two groups from each other so that each of them has a different Dashboard?

Thanks for your time, and have a nice day!

0 likes
2 replies
jlrdw's avatar
jlrdw
Best Answer
Level 75

One table for users. Use Authentication for login required, use authorization to determine what the logged-in user can or cannot do.

Everyone in this system is a user they can just do and not do certain things, depending on their role.

As far as a separate dashboard, you can duplicate one and design one for admins, one for teachers, etc.

Then when logged in redirect to the correct dashboard depending on role.

See https://laracasts.com/discuss/channels/laravel/version-8-redirects

2 likes
shaungbhone's avatar
Fortify::loginView(function () {
            if (Route::get('/login')) {
                return view('/auth.userlogin');
            } else {
                return view('auth.adminlogin');
            }
        });
3 likes

Please or to participate in this conversation.