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

DPST's avatar
Level 1

Roles or Extra Tables?

I recently took a look at https://github.com/spatie/blender and saw that they use two different tables for admins and normal users.

Now I am wondering what the advantage of that is. Wouldn't user roles provide more flexibility in case database tables change or the permissions change?

So what is the advantage of having a table for front and a table for back users?

0 likes
2 replies
mdecooman's avatar

I would see some advantages but it is really not a universal answer:

  • Divide to conquer: your security audit is easier. (very opinionated).
  • It may simplify some DB queries in your controller for some views.
  • maybe you want, at a later stage, give your users access to a different API or back-end. The admins from one are not the admin of the other.

Anyone with a real use case welcome. I never used blender but interesting question.

DPST's avatar
Level 1

The simpler queries I can see but wouldn't the different access model be solved easier with roles and giving those roles permissions? Seems much more flexible to me to use roles and permissions.

Please or to participate in this conversation.