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

rameezisrar's avatar

How to get the 'id' of any paid plan anywhere in a class?

How to get the 'id' of any paid plan anywhere in a class? ' In Spark::plan('Plan-A', 'provider-id-1') function, the second parameter refers to the id of a plan ? As i need to pass the id of a plan to my controller.

0 likes
3 replies
vmitchell85's avatar

I don't think I know exactly what your use case is, but there are a few methods on the ManagesAvailablePlans trait on the Laravel\Spark\Spark class that you might be able to use.

Check out these:

  • activePlans
  • activePlanIds
  • activeTeamPlans
  • activeTeamPlanIds
1 like
vmitchell85's avatar

sorry for the delay... I wish email notifications worked automatically on here...

Laravel\Spark\Spark::actovePlans() should return all the active plans.

Please or to participate in this conversation.