Pivot or Model or both? #750
-
I want to use WinterCMS for managing - so the most important part is backend not frontend (for now) I have models: member fee memberfee (for now it is pivot) And now I realized that I need backend-menu - Member Fees. But And now - should I change memberfee class from pivot to model (and then use it in controller) or should I create model beside of pivot, or maybe something else? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Not sure I understand 100%, but I would create a dropdown field in your pivot and assign it options using getFieldOptions() and select those when creating the relation pivot data. That |
Beta Was this translation helpful? Give feedback.
-
You can always add an action to your Members controller to show the fees paid. Otherwise, the Pivot class actually extends Model, so you could probably add a Controller for it, I guess. |
Beta Was this translation helpful? Give feedback.
You can always add an action to your Members controller to show the fees paid. Otherwise, the Pivot class actually extends Model, so you could probably add a Controller for it, I guess.