mpociot / teamwork

User to Team associations with invitation system for the Laravel 5 Framework
MIT License
1.07k stars 170 forks source link

Stripe integration #2

Closed Jamesking56 closed 9 years ago

Jamesking56 commented 9 years ago

When using this package in Laravel with Laravel cashier. What is the billable entity? Is it the owner of the team or the team itself (with the owner managing each associated team's billing settings)?

sschlein commented 9 years ago

It depends on your business model. We're using the owner of the team as billable entity. An owner could have multiple teams and pay for all of them. You could also bind the billable entity to a team model if you want to bind the subscription on a team basis. As flexible as possible :)

Jamesking56 commented 9 years ago

I think I'll probably attach the Billable trait to the Team and have the owner as the only one with permission to manage billing for the team. This way its still secured but then if the owner is swapped with another user (the team maybe got bought out in real life), the billing info (if its a company card) would stay?

Opinions?

mpociot commented 9 years ago

Sounds like that's the best way to do it for your specific use case. :+1:

And please let me know when you've built something awesome with the help of this module. I would love to list some "battle proofed" real world projects!