bpuig / laravel-subby

Laravel Plan and Subscriptions manager.
https://bpuig.github.io/laravel-subby
MIT License
102 stars 42 forks source link

Doubts starting using this #151

Closed rikardow closed 1 year ago

rikardow commented 1 year ago

Hi, first of all, thanks for this great project, but I'm having some doubts configuring this, where I'm supposed to put the Plans/Features definition? On a migration or on a model? Thanks

bpuig commented 1 year ago

Do you mean feeding the data? Or defining the relationship? Can you explain further? Thanks

rikardow commented 1 year ago

This part, when you create a plan:

image

Seems like something to put on a migration to create the plan once, but I'm not really sure if that's how it's intended to work

Same question with the Plan Features:

image

Thanks for your help

bpuig commented 1 year ago

I can give my opinion, but the last word on how to make it depends on you and the needs of your project. This examples are filled with written text for explaining purposes, if your data is not static I'm sure you will need to make your CRUD endpoints to maintain the plans.

If it is something you do not plan to ever change, you can use a Seeder or Migration. But this doubt is more about best practices and how you have structured your project than something that needs to be clarified in the package.

The decision is yours, because only you know the needs of your app.

rikardow commented 1 year ago

I'm just gonna take a look at the source code to see how exactly this works so I can choose the best way, thanks for your help