I cannot get custom values to save to table for plugin in Craft3 Plugin

I’m trying to save 2 values to a table from my plugin but I haven’t had any luck. On a new save I have this $business = new BusinessModel(); $request = Craft::$app->getRequest(); $business->id = $request->getBodyParam(‘typeId’); $business->name = $request->getBodyParam(‘name’); $business->handle = $request->getBodyParam(‘handle’); $business->passcode = $request->getBodyParam(‘passcode’); $business->discount = $request->getBodyParam(‘discount’); // other stuff between here if (BusinessToBusiness::$plugin->business->saveBusiness($business)) Craft::$app->getSession()->setNotice(Craft::t(‘business-to-business’,…

Details

python basic class question, where am i going wrong

I’m slowly trying to get my head around classes. I have a few working examples which i kinda understand but can someone please explain to me why this doesn’t work? class python: def __init__(self,name): self.name=name def changename(self,newname): self.name=newname abc=python(‘python’) print abc.name abc.changename = ‘anaconda’ print abc.name All I’m trying to do here is change the…

Details

How to influence the components that are in the slot vuejs?

I have a component in which there are 2 buttons and checkboxes that are inserted through <slot>. How can I change the checkbox’s prop when I click the buttons in the component? Checkbox.vue: <template lang=”pug”> .field label.checkbox(:class=”‘checkbox_’+badge”) input(type=”checkbox” :checked=”checked”) span(v-if=”title”) <small v-if=”summ”></small> </template> <script> export default { name: “checkbox”, props: { title: { type: String…

Details