Storing Aliases
Closed this issue · 1 comments
Hello Everyone,
I have a problem/question.
In the config there is the permissions
section and on the comments it says that this should only be used if you are using the array driver.
so my question is where am I suppose to define what the aliases are? and are they not suppose to be stored in the database if you are using the database driver?
Thank You
Hey hey! I'm so sorry for responding so late. I must have missed this because of the holidays.
Anyway, I think you're referring to the Laravel package config file here? https://github.com/BeatSwitch/lock-laravel/blob/master/src/config/config.php
It's actually a bit of poor wording on my end. I'll try to explain a little better. You should absolutely define your aliases in the config file and no-where else. Aliases are just a neat way of grouping certain actions when you want to set permissions on all of them at once. They don't need to be stored in the database because you'll probably never want to use a UI to change these. They should be defined once in your config and then used in your code to change permissions on a range of actions at once.
I hope this helps a bit. Please let me know if anything is unclear and I'll be happy to explain further!