If you needs roles and permissions for a laravel application, I recommend this package:
permissions and roles laravel
hi all can I generate my permissions and roles for my projects without writing them from some services or application?
@drewdan i have a big crud in my projects so i ask about if can generate permission for each crud in my project without code theme from scratch
@Russelmhardy How are you applying permissions to your controllers?
You can scaffold policies using php artisan make:policy which accepts a model as an argument to generate crud policies. I think polices are the best way to authorize cruddy controllers.
without writing them from some services or application
Struggling to understand what you mean by this part...
@tykus I think, they mean without having to write a package to do it? That's how I (perhaps wrongly) interpreted it
@tykus i have a big crud in my projects so i ask about if can generate permission for each crud in my project without code theme from scratch
@Russelmhardy roles and permissions are determined by your business rules, so there is no avoiding that aspect of your task. You will need to define the roles and the permissions; and you will have to ensure that the data that is visible, and actions available to your users, are enforced by checking the permission(s) at every one of your applications views/endpoints.
Otherwise, the underlying implementation can be outsourced to a third party package such as the aforementioned Laravel Permission, or Bouncer, or LaraTrust
Please or to participate in this conversation.