This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
Alien
I want to add function afterSave() in my model file. In the afterSave() i want to update other table value
I've tried to add use \ABWebDevelopers\Forms\Models\Field; but in generating errors 'cannot use ABWebDevelopers\Forms\Models\Field - it is not a trait'
public function afterSave() {
$camp_form = Field::where("id", 5)->first();
$caml_form->update(['status' => 1]);
$camp_form->save();
}
Last updated
1-1 of 1