Labs64 / laravel-boilerplate

Laravel Boilerplate / Starter Kit with Gentelella Admin Theme
https://github.com/Labs64/laravel-boilerplate/wiki
MIT License
916 stars 327 forks source link

Membership management #39

Closed gslongo closed 6 years ago

gslongo commented 6 years ago

Hi,

I would like to create a dashoard for members. I succeed but I would like to know how to disable NetLicensing protection ? Or better, how to manage free memberships and paid plans ?

Thanks !

v-rudkovskiy commented 6 years ago

@gslongo Hi,

More details about the how setup and manage Members plans you can read here

Members plans (Protection middleware) is based on a licensing service https://netlicensing.io/. Unfortunately at the moment the netlicensing.io service does not support the "Pricing Tables"(paid plans) licensing model. But work on adding this model is already underway.

You can see the supported license models here. How to get started with the netlicensing.io service you can read here.

To disable "NetLicensing protection", just remove the middleware from the route.

r-brown commented 6 years ago

Hi @gslongo ,

1 If you want to get rid of NetLicensing Membership support, you can deactivate middleware routes: https://github.com/Labs64/laravel-boilerplate/wiki/Membership-Plans-setup#source-code-examples and delete NetLicensing dependency at composer.json In that case, you’d need to take care of your own implementation for the membership.

2 In the case you would still keep NetLicensing support and need to enable flexible membership plans, you can create multiple Product Modules at NetLicensing, where each module is licensed using Subscription licensing model and defines available membership period.

Let me provide basic sample scenario here:

Product (your portal)
    Product Module 1 (Free Plan)
        License Template 1 (Subscription for 1 month)
        License Template 1 (Subscription for 1 year)
    Product Module 1 (Basic Plan)
        License Template 1 (Subscription for 1 month)
        License Template 1 (Subscription for 1 year)
    Product Module 1 (Premium Plan)
        License Template 1 (Subscription for 1 month)
        License Template 1 (Subscription for 1 year)

In order to enable / disable application functionalities you can use this blade directive:

@protection(product-module-free)
    Enable free features
@elseifprotection(product-module-basic)
    Enable basic features
@elseifprotection(product-module-advanced)
    Enable advanced features
@elseprotection
    Access denied
@endprotection
gslongo commented 6 years ago

Clear !

Thank you for your answer :-)

Suggestion: I'm discovering the template structure, but also Laravel... If've found defining menus and routes manually is very annoying. I don't know yet if I'm right (lol...), but I've coded a small portion of code which generates sidemenu and routes based on a config (array). I can share it if you want..

//EDIT: Note, I'm still struggling on the Breadcrumb generation, but it also should be done soon

r-brown commented 6 years ago

Hi @gslongo , sure, we are always happy to see, that this Laravel Boilerplate helps others to setupr awesome projects. You can share your result, and maybe this will give some impressions to other users.

Btw: Defining of routes is standard Laravel concept :)

You can also use documentation at https://laravel.com/docs/ which is providing a very good overview on Laravel capabilities.