{"repo":"lucasdotvin/laravel-soulbscription","free":true,"listed":false,"github":"https://github.com/lucasdotvin/laravel-soulbscription","clone":"git clone https://github.com/lucasdotvin/laravel-soulbscription.git","description":"A straightforward interface to handle subscriptions and feature consumption.","language":"PHP","stars":709,"topics":["laravel","subscriptions","hacktoberfest"],"license":"MIT","category":"auth-billing-email","readme_excerpt":"Laravel Soulbscription About A straightforward interface to handle subscriptions and features consumption. Installation You can install the package via composer: The package migrations are loaded automatically, but you can still publish them with this command: Upgrades If you already use this package and need to move to a newer version, don't forget to publish the upgrade migrations: Check out the available upgrade migrations by looking at the upgrades folder. Usage To start using it, you just have to add the given trait to your User model (or any entity you want to have subscriptions): And that's it! Setting Features Up First things first, you have to define the features you'll offer. In the example below, we are creating two features: one to handle how much minutes each user can spend with deploys and if they can use subdomains. By saying the deploy-minutes is a consumable feature, we are telling the users can use it a limited number of times (or until a given amount). On the other hand, by passing PeriodicityType::Day and 1 as its periodicity type and periodicity respectively, we said that it should be renewed everyday. So a user could spend his minutes today and have it back tomorrow, for instance. It is important to keep in mind that both plans and consumable features have its periodicity, so your users can, for instance, have a monthly plan with weekly features. The other feature we defined was $customDomain , which was a not consumable feature. By being not consumable,","default_branch":null,"files":null,"tree":[],"storefront":"/r/lucasdotvin","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/lucasdotvin/laravel-soulbscription/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}