PHP Classes
elePHPant
Icontem

Why should normal user model never be used with admins?

Recommend this page to a friend!

      PHP Classes blog  >  How to use Laravel Mu...  >  All threads  >  Why should normal user model never...  >  (Un) Subscribe thread alerts  
Subject:Why should normal user model never...
Summary:Need an explanation why not to use normal model for admins
Messages:3
Author:Pjotr
Date:2019-11-12 07:20:46
Update:2019-12-05 23:27:55
 

 


  1. Why should normal user model never...   Reply   Report abuse  
Pjotr - 2019-11-12 16:19:21
Would you be so kind to explain why should marking a normal user as admin approach, either using is_admin flag on users table or some kind of roles solution, should never be used? Most php platforms that exist today are using that kind of approach to handling users with special roles.

  2. Re: Why should normal user model never...   Reply   Report abuse  
Decode Web - 2019-11-18 22:02:15 - In reply to message 1 from Pjotr
It is so because of the performance issue if using single model for different ->type<- of users.

  3. Re: Why should normal user model never...   Reply   Report abuse  
ethio - 2019-12-05 23:27:55 - In reply to message 2 from Decode Web
what if use have more roles like student, teacher, dean, cafe ....
isn't it cool to have a separate role table instead of creating a guard for many roles