I need to change the logic used in the Spark Controllers. Can I make the controllers publish into my App/http/controllers directory just like another vendor package?
The basic idea is that you override the route and use your own controller which extends the spark controller. This way you can override the specific method and do your own action in there ;)
@bobbybouwmann thankyou for sharing this link. That could be one option but honestly, that is tiresome.
When I do vendor: publish command I get this output
I think Spark-full will publish everything in the respective directories if it does then whenever I need to change a specific function I will go to published file.
@martinbean Actually I need to override the Spark Controller because I need to change how the subscription work. Consider this scenario:
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?
@martinbean Quantity is something else. What I need is multiple subscriptions for a user as right now Spark allows only one subscription for a user. So I need to alter the Spark Controller