Comments (12)
Done! Packages were wrong because I just c&p from my main project. Now it's correct in alpha.1 and supports laravel 7 and 8 correctly.
from laravel-subby.
Yes, I think it would be nice to also be able to attach features to user instead of only plan. Let me think a bit about it and the best way to do it.
Maybe the easiest and more straight forward way to solve it is making plan_features
also morphable, and let them belong to plan or subscriber. That way you can attach features also to users.
The logic to attach said features would be coder's responsibility (duplicating like you or just attaching manually), everyone has it's methods and the more open is, the better.
from laravel-subby.
Take a look at this branch. Features can be attached to subscription via plan or just feature, it creates a replica of plan data in subscription, so subscription is not altered when plan is changed. Still work to do, but it would be awesome if someone gave it a try before releasing.
from laravel-subby.
Great! I'm off for the weekend and will test on Monday.
BTW. Do you know the library https://github.com/spatie/laravel-permission? I wonder if the both libraries "collide" or could cooperate? Or maybe here we could use the permissions implementation for the features? Or at least have a look how they implemented it. They use Laravel gates and eg. it's possible to use directly $user->can('edit articles');
. On the other hand, AFAIK they do not use the counter for feature usage.
from laravel-subby.
I don't think they will collide, I've used myself that package sometimes and I can't think of any function name that could collide. Mostly since all logic is done on $user->subscription() and not in $user. HasSubscriptions
trait only has methods newSubscription
, isSubscribedTo
, subscribedPlans
, activeSubscriptions
and a couple relationships, that names are not in spatie's package. There will be no issue.
from laravel-subby.
I made a pre-release v4.0.0-alpha, note: schedules are now out of this package and in a separate package bpuig/laravel-subby-schedule as an extension.
from laravel-subby.
H! Do we need to use doctrine/dbal in v3? Seems to be "too new" :) I have some problems with installation, including Nova dependencies.
More info here: laravel/nova-issues#3088 so it would be great to be more backwards compatible and use dbal 2.9/3. And could laravel-subby be used as well by Laravel 7 installations?
from laravel-subby.
And could laravel-subby be used as well by Laravel 7 installations?
Issue here is that uses job batching, and that's a Laravel 8 functionality. Take a look at the package and the way schedules are processed. If you find a way that does not need batch but does the same, I'm open to suggestions.
from laravel-subby.
I'll come back to you with more feedback tomorrow.
PS. Maybe we could set up a slack channel to discuss more easily?
from laravel-subby.
Hi @bpuig! I tested the library a bit and the functioning of plan_subscription_features
works as expected :) It's great we can have individual features per subscriber now. And that each subscriber has its own price at plan_subscriptions
.
I came across some issues or enhancement suggestions which I will file in separate issues not to mix up this general thread.
from laravel-subby.
Perfect, I found a minor error yesterday and also tested everything. I think it's ready for release 👍
I'll close this issue now and do a release.
PS. Maybe we could set up a slack channel to discuss more easily?
To be honest, I've never used it, I've always been a solo coder so I do not know how it works. If you don't mind we can keep this here in the issue, and if someone comes in the future can find everything.
from laravel-subby.
Ok, that's everything what I have found :) I'm off for today, will come back tomorrow with further testing and actually doing the implementation :)
IMHO these two are the most important: #28 and #30 and you can go with the v4 release 🥇
from laravel-subby.
Related Issues (20)
- I can not install on Laravel 9 ! HOT 3
- Documentation HOT 2
- Default database migration isn't compatible with MySQL HOT 6
- changePlan -> deleteFeaturesNotInPlan Bug HOT 1
- Free plan HOT 2
- Foreign key constraint is incorrectly formed HOT 1
- getSubscriptionRemainingUsagePriceProrate for year invoice interval HOT 2
- If user has more than one subscription, does not return total value of both subscription's feature HOT 2
- Call to a member function getKey() on array error HOT 5
- Per-Seat Billing Plans feature HOT 2
- Trait method newSubscription collision with Laravel Cashier HOT 2
- Method addMounths does not exist ---> newSubscription() HOT 1
- Bpuig \ Subby \ Exceptions\ DuplicateException HOT 2
- App\Models\User::activeSubscriptions must return a relationship instance. HOT 3
- Trial interval doesn't work when we use PlanCombination instead Plan
- SubscriptionPaymentQueuerJob now doesn't work
- Subscription feature price HOT 3
- Doubts starting using this HOT 4
- Missing PlanSubscriptionScheduleService Contract
- Change plan or/and renew plan period HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel-subby.