Use of the normal users table vs a dedicated one? #30
-
|
In most cases, I don't want to have a dedicated users table for administrators. I already have roles and something akin to an is_admin column in my regular old users table. Having skimmed the code it looks like just using the standard Laravel users table is a trivial matter and I'm sure it'll take me next to no time to get it set up. I guess I'm just wondering whether it would be worth making the User model a configuration setting so that it's truly trivial for anyone that doesn't want a separate table of users. Or, at the very least, would it make sense to add instructions to the documentation on how to accomplish it. Either way, great looking package. I plan to pull it into something I'm working on right now (and hack away until my existing admin users can use it) and can't wait to see it in action! |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 17 replies
-
|
Definitely second this. In my use-case I would like to call a method |
Beta Was this translation helpful? Give feedback.
-
|
Hi! Thanks for the suggestion. I'm open to making the users table configurable. However, and I probably didn't make this clear enough in the docs, the I could implement checks like |
Beta Was this translation helpful? Give feedback.
-
|
Another way to tackle this, as mentioned in Discord by @ryangjchandler, is to migrate to use Laravel Gates and Policies instead of using filament specific DB tables and models. This is the way that Nova handles their CMS access. If implemented, it will mean a breaking change, and maybe most of us could just accept it as a Any other ideas? |
Beta Was this translation helpful? Give feedback.
-
|
Hey @edgrosvenor @Wulfheart @iksaku. I've opened #72 with support for this feature. Would be great if you could review, thanks! |
Beta Was this translation helpful? Give feedback.
-
|
Supported from v1.3.0. |
Beta Was this translation helpful? Give feedback.
Supported from v1.3.0.