mardi 17 décembre 2019

Laravel assigning permission based on subscription

I am working on a project where i need assign permission to users,category and subscription.

User Role Permission - few url not accessing to user role so i need to check this in middleware.

Category permission -Here also few urls and few blocks inside page are not there to few category.

Subscription type -Based on purchased subscription few urls or pages and few blocks inside pages are not accessible.

Now my thinking of solving this in following method

Assigning module(urls ) permission to user a, category ,plan using pivot tables separately and in middleware

But my above logic has one issue where i need assign same module to all 3 .It means i need to repeat .For example if user as add post permission then i need to assign to category and subscription too.

Then if Category has permission

then if subscription has permission

then go to desired page

If any one has better option please do share .



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire