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

rameezisrar's avatar

Selecting multiple Plans at the same time

I have 5 Products that I want to sell on subscription. Spark makes it use as Plans, right. But spark allows me only to switch from one plan to another while I need to make a user subscribe to other products at the same. i.e The user has subscribed to 5 products at the same times instead of one. How can I achieve that? I need to change the functionality of controllers of the Spark, right? First, how can I override the Spark controllers and where to place those controllers so I can update Spark later in the future?

0 likes
3 replies
Cronix's avatar

I haven't needed to do that, so I really don't know.

Cronix's avatar

Apparently it would require a lot of work. Not just altering Spark, but Laravel Cashier would also need to be altered. The way spark/cashier is set up, there is only 1 db column to hold the subscription per user or per team, so you'd have to rework that and add a 2nd table so you could have 1 to many subscriptions (it's one to one right now).

That would take a lot of work to do, and really I wouldn't even know where to start with it as I've never needed to alter the main subscription functionality. You'd also have to alter it in such a way that you don't alter the /vendor files, or you'll never be able to upgrade spark/cashier without your changes getting overwritten.

Do these products cost the same? If so, it wouldn't be hard to create 3 separate plans. One for 1 product, another for 2 products and another for 3 products, and then just limit what they can do by the plan they are on. But personally, I wouldn't even attempt to try to get multiple subscriptions working. It just wasn't designed for it and it really would be a lot of work.

1 like

Please or to participate in this conversation.