use @can, @role in client side(second app) app while database is in server side(first app) app #2247
-
Hi, Currently i want to ask a question features of first laravel app for rest api:----------------------- Server Side App users tablejohn is a super admin and can delete-records Role tablesuper admin Permissions tableview-records working of this app is connection with database Features of Second Laravel App for frontend only (connected to no database):--------- Client Side App @ROLE('Super Admin') this currently i am using if and else for this. but i want to find a smarter way |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Without spattie package there is no |
Beta Was this translation helpful? Give feedback.
-
laravel-permission/src/PermissionServiceProvider.php Lines 87 to 147 in bc2227c |
Beta Was this translation helpful? Give feedback.
Without spattie package there is no
@role
But you could register your own blade directives for avoid if ... else