Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

alanstorm's avatar

Laravel Spark: “All My Teams” Billing

As I understand it, Laravel Spark has two billing modes.

The first is individual billing. In individual billing, each user account is responsible for signing up for and paying for its own service.

The second is team billing. In team billing, you can sign up all the users on an individual team for plan.

If either of the above are incorrect assumptions, please let me know.

What I need/want to do might be called "All My Teams" or "Team of Teams" billing. I need an administrative user to be able to create multiple teams with different users, and have all those users managed (for billing purposes) under a single subscription.

Is this possible with Laravel Spark?

If not, is there known science for how to do this? Get as detailed as you'd like, but I'm just looking for the broad strokes here, and trying to to duplicate work if it already exists.

0 likes
4 replies
SteamDiesel's avatar

It depends on how you expect your users to behave within the app.

I hadn't considered this until reading your question. But I guess if you want to keep the billing as simple as possible, so for a company to have one account with multiple teams and users in it. You could just build out your app within the spark framework to have the teams you want. So spark would only be responsible for billing and user control, but data access is walled off to the outside world by the spark team for billing, then team data and users are walled off within your app.

You could just play with the words you use to describe these sub-teams. You can also change the way spark refers to "teams" to another, more fitting word, like "Organisation" or "account". And within the native spark teams, you could call your sub-team groups anything else, eg; "squad", "Wolfpack", "department", "team". You'd just make appropriate models, controllers, middleware, and routes to suit this need for sub-team groups.

Maybe, as an alternative, you could re-purpose the role intermediate column in the user_team table. Or even add a 4th column to refer to the team. But that might make it difficult and confusing if you want a person to have multiple roles and teams within the "organization".

1 like
alanstorm's avatar

Thanks @SteamDiesel -- yeah, there's myriad ways to work around it, or implement it myself. I just wanted to make sure I wasn't reinventing the wheel before I set off on coming up with my own solution.

awnage's avatar

I tried doing this with:

        Spark::plan('The Plan', 'theplan')
            ->price(100)
            ->yearly()
            ->maxTeams(2)
            ->maxTeamMembers(5)
            ->features([
                '2 Teams with 5 Members'
            ]);

But when team members join, they are on a Trial sub. Apparently maxTeamMembers only functions as expected with Spark::teamPlan, but then you have to pay per team.

Please or to participate in this conversation.