Open denismitr opened 6 years ago
Using https://github.com/denismitr/laravel-json-attributes
can also serve to dynamically add a list of priviledges that each plan offers
- via config, just by making an array of plan names and the cap.
I am liking this option the best. It keeps the application specific limits in a centralized place and seems like it would be the cleanest way to accomplish.
// config/plans.php
return [
'bronze' => [
'concurrency_cap' => 1,
],
'silver' => [
'concurrency_cap' => 2,
],
'gold' => [
'concurrency_cap' => 10,
],
];
or something along those lines. Maybe this?
// config/plans.php
return [
'concurrency_cap' => [
'bronze' => 1.
'silver' => 2,
'gold' => 10,
],
]
Hi, Tom!
Just thinking here, we can solve this in different ways:
rocket-analytics
Plan
model (here in this package), so that arbitrary data could be stored there, like various caps. I have a package for that:https://github.com/denismitr/laravel-json-attributes
it already has been tried inlaravel-event-recorder
package and works well