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

anibabbar's avatar

User Roles

What should be the best way of managing 3 different users Permissions?

Admin = 0 Staff = 1 Registered User = 3

should I just create another column in the user table 'user_type' and then somehow restrict users to certain controller methods ?

Please suggest!

0 likes
5 replies
Tray2's avatar

Since it's a one to one in this case you can get away with adding the role to the users table.

Then you can check for it like

if (Auth::user()->role == ADMIN) {
	//Do some admin stuff	
}
anibabbar's avatar

can we limit user access directly from routes (routes/web.php)

like one route only accessible by admin.

Please or to participate in this conversation.