GithubHelp home page GithubHelp logo

czechbox / laravelplans Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gerardojbaez/laraplans

9.0 9.0 15.0 215 KB

SaaS style recurring plans and their features for Laravel 6.x & 7.x

Home Page: http://czechbox-laraplans.readthedocs.io

License: MIT License

PHP 100.00%

laravelplans's People

Contributors

acen avatar adibnaya avatar bgultekin avatar czechbox avatar gerardojbaez avatar konafets avatar richardkeep avatar rifan75 avatar siarheipashkevich avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

laravelplans's Issues

Where to save additional details?

I have been testing this package and it looks great.

I am using paypal recurring payments api, I know that payment is not part of this implementation but I would like to have a place where I could save the returned details of the subscription we get from paypal (orderID,Billingtoken,subscriptionID ) so I can use it later to check the subscription status with the payment provider.

Do we have to create the additional field or table ourselves or this package has a way to handle this additional data?

Thanks.

Missing plan_feature_id column in plan_subscription_usages table

Could you please add missing column plan_feature_id to plan_subscription_usages table?

Because right now relation usage of the PlanFeature model is working incorrectly.

$usage = $feature->usage;

 SQLSTATE[42S22]: Column not found: 1054 Unknown column 'plan_subscription_usages.plan_feature_id' in 'where clause' (SQL: select * from `plan_subscription_usages` where `plan_subscription_usages`.`plan_feature_id` = 3798 and `plan_subscription_usages`.`plan_feature_id` is not null)

Invalid plan feature: listings

I hvae been following your documentation step by step. However, when I tried to Record Feature Usage using the code below:

$user->subscriptionUsage('main')->record('listings', 2);,

I get the error below:

Czechbox/LaravelPlans/Exceptions/InvalidPlanFeatureException with message 'Invalid plan feature: listings'

image

I am using Laravel Framework 7.29.2
Can you help me fix this issue. Thanks.

laravel 8 update

Do you think you will update this package to support laravel 8? Thanks

Renew Subscription Does Not Work as It Should

The Renew of any subscription does not work. it renews a period starting from starts at not ends at.
which is wrong, if you want to renew existing Subscription the new period added should start from ends at and adds the Interval.

in your code
'
protected function calculate()
{
$method = $this->getMethod();
$start = clone($this->start);
$this->end = $start->$method($this->interval_count);
}
``
this should be in renewal case
protected function calculate()
{
$method = $this->getMethod();
$start = clone($this->end);
$this->end = $start->$method($this->interval_count);
}

so the new period starts from where the last subscription ends.

Good day

Bug with features reset date, they should always be generated after now.

@czechbox

There is a bug with features reset dates. Reset dates should never be set before today.

If a user subscribes to a yearly plan, uses a feature monthly resettable feature in January, and uses it again on April, the code to regenerate the feature reset date is not correct. It will generate a reset date 1 month after on the first use, then regenerate the date 1 month after on the second use, etc.

I'm submitted the PR and issue in the original repo: gerardojbaez#62

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.